Compare commits
957 Commits
wxPy_2_3b1
...
b4_OOR_1
Author | SHA1 | Date | |
---|---|---|---|
|
645325a423 | ||
|
3b36695de4 | ||
|
5fb9d2be3f | ||
|
2be39ac9d8 | ||
|
ed8fad817a | ||
|
5d483828d7 | ||
|
ca289436cd | ||
|
66e23ad208 | ||
|
638a0b2c72 | ||
|
abd799473c | ||
|
2e9760c0ee | ||
|
ea39b21033 | ||
|
50c679c81a | ||
|
b577ba22cb | ||
|
cad599a1f1 | ||
|
2e6d38adea | ||
|
989befded3 | ||
|
73348d0997 | ||
|
badb78928f | ||
|
3e729cbe15 | ||
|
3caec1bb33 | ||
|
00a693ed2f | ||
|
0133d06b1a | ||
|
c9d4f881e7 | ||
|
47b37e4be4 | ||
|
cf1a9b45c7 | ||
|
615dca338b | ||
|
f87a708b14 | ||
|
65a9e6162b | ||
|
f50fd91940 | ||
|
0eaa1d68c2 | ||
|
71e483d39a | ||
|
aaa63f666a | ||
|
973b0afb1e | ||
|
b7d667c57b | ||
|
60bc40875d | ||
|
9a179dccb9 | ||
|
10d3680f1a | ||
|
b916de3e4f | ||
|
790ba06b28 | ||
|
9ff647cf66 | ||
|
ab85e6cd00 | ||
|
0a67a93b17 | ||
|
233d02951f | ||
|
bf505d2855 | ||
|
794c5cb151 | ||
|
7a446686f0 | ||
|
daaa6710be | ||
|
13806c7d4a | ||
|
c8b5f745c4 | ||
|
1c8183e213 | ||
|
2d4cc5b600 | ||
|
779cedff87 | ||
|
e96360efd9 | ||
|
1c84ee88f6 | ||
|
e7d5dd022c | ||
|
239229258a | ||
|
00b2a5df95 | ||
|
7c4878b682 | ||
|
ccb220600d | ||
|
1ce70313be | ||
|
0c55409f3a | ||
|
e6b506bf47 | ||
|
b97e22c0ca | ||
|
d2c6d54928 | ||
|
db157a6cf8 | ||
|
1661948432 | ||
|
d1679124ae | ||
|
37d6243357 | ||
|
d13d99aa85 | ||
|
0f7a546d9c | ||
|
a2cf862156 | ||
|
daa084c239 | ||
|
576507e276 | ||
|
bdb6e206f1 | ||
|
f55d21ebb5 | ||
|
8173fefe0a | ||
|
96742edfff | ||
|
960ba969f9 | ||
|
8513c19cba | ||
|
219a5f10c0 | ||
|
d2bf4e837a | ||
|
52da3c7175 | ||
|
ddfc587a2e | ||
|
e42c7b8567 | ||
|
f2854a2438 | ||
|
1c98149d12 | ||
|
b51c3f276c | ||
|
d2c52078dc | ||
|
bfb9ee966d | ||
|
26ffe1fdba | ||
|
50c76ce1f7 | ||
|
d20cf96f70 | ||
|
67fc151d73 | ||
|
025292e998 | ||
|
d9b91de7d3 | ||
|
4726948f8e | ||
|
3ba55e664d | ||
|
ab708d5def | ||
|
892aeafc2a | ||
|
75e0142942 | ||
|
eb8671f277 | ||
|
7edb85b724 | ||
|
c5dd44b5da | ||
|
60869eaf7e | ||
|
54921697ae | ||
|
c3952f6524 | ||
|
33ac7e6f01 | ||
|
b1d1dc510d | ||
|
f3cf386509 | ||
|
947ea04d01 | ||
|
830ed6d97d | ||
|
2f51a9ecc5 | ||
|
3d5aff50cb | ||
|
a92edd311c | ||
|
0bc0cd5d81 | ||
|
c854c7d92c | ||
|
7699e843c0 | ||
|
c112dde0a0 | ||
|
2900bd1c81 | ||
|
d9a4f62064 | ||
|
5570ec300e | ||
|
35b6b7d54a | ||
|
72d750d462 | ||
|
49348d874d | ||
|
91c41b30c2 | ||
|
9e689c0658 | ||
|
ec5d77998a | ||
|
926bb76c2a | ||
|
ed1ae3fb27 | ||
|
7114b9fa28 | ||
|
b6962846e8 | ||
|
d7ec656498 | ||
|
a51fb6427c | ||
|
adebd2d72c | ||
|
3875544933 | ||
|
51523f25d7 | ||
|
716ed2259a | ||
|
fa3541bd15 | ||
|
6957a370ff | ||
|
468ae730db | ||
|
aafe448833 | ||
|
5e8e25e729 | ||
|
9749497156 | ||
|
dad9554b4c | ||
|
d969af82fc | ||
|
30954328be | ||
|
fa1c6ab937 | ||
|
e74a9319f9 | ||
|
c97e7fa8db | ||
|
c3f4609ebb | ||
|
0de01330ba | ||
|
b86e511a9b | ||
|
424f5e2700 | ||
|
9d8bdf2dbc | ||
|
7f0275efe2 | ||
|
079c842cae | ||
|
3e968053fb | ||
|
56cff98620 | ||
|
f040060e2f | ||
|
6523de8a56 | ||
|
00a32dc1fb | ||
|
29f45f85e9 | ||
|
71d04f7ffd | ||
|
b6c8bd6959 | ||
|
c03b48d7f8 | ||
|
88c49a0f21 | ||
|
df05452ec0 | ||
|
7905ec5558 | ||
|
b0a2157c88 | ||
|
28c6addc20 | ||
|
891000d61b | ||
|
53a240f02b | ||
|
e143729845 | ||
|
67a6726a2c | ||
|
6d56eb5c56 | ||
|
7d88e2447e | ||
|
1216f52d92 | ||
|
a701b7f87e | ||
|
963a1fcd6e | ||
|
94fdced0a0 | ||
|
c2229593ba | ||
|
a0b1b91fe6 | ||
|
9ef2e675a5 | ||
|
b93d0d082d | ||
|
65ba4113c6 | ||
|
3b59b26706 | ||
|
a98f98ac6f | ||
|
6a611b39fe | ||
|
95c8801cdf | ||
|
1309ba6c7e | ||
|
3da2715fb8 | ||
|
2c1c448a24 | ||
|
1cf8c0a9d4 | ||
|
a06c1b9b72 | ||
|
2b813b73cd | ||
|
4ea45e6ba3 | ||
|
e545ddb6e5 | ||
|
6d51f22029 | ||
|
08399e45e7 | ||
|
5fd2b2c6ae | ||
|
cffbfebc68 | ||
|
0bbfe845ed | ||
|
eba0e3477b | ||
|
cb21bd1b10 | ||
|
31929f8009 | ||
|
c96ea65713 | ||
|
a8d4e3ac60 | ||
|
45ef9db336 | ||
|
ce113d5ffe | ||
|
0046ff7c4f | ||
|
3ff75b5a4f | ||
|
775c6f0cd2 | ||
|
a92d972108 | ||
|
b9c15d1092 | ||
|
efe7d6ff7e | ||
|
3417f6618c | ||
|
7529690de8 | ||
|
5cd09f0b8d | ||
|
f1339c5685 | ||
|
3f2bcf3437 | ||
|
1f3943e027 | ||
|
942bef71b0 | ||
|
b06a6b20d5 | ||
|
1600865926 | ||
|
97af118998 | ||
|
17f7bb9ed5 | ||
|
8bf30fe9b0 | ||
|
f4929e864e | ||
|
3897b707bd | ||
|
461697c2ae | ||
|
ecdce304e4 | ||
|
9c21efe301 | ||
|
807a903e68 | ||
|
0fa7981012 | ||
|
8269a90377 | ||
|
f74d0b57aa | ||
|
f15b49521a | ||
|
8cfc5426cf | ||
|
61cca9d24e | ||
|
abe5726aff | ||
|
35cd9dba7b | ||
|
5f6d6405bb | ||
|
e9c4505ef4 | ||
|
254b84f3fd | ||
|
c6b4bf32aa | ||
|
84d31cc23f | ||
|
8ab7390901 | ||
|
6b48f1bdc5 | ||
|
0a651eb856 | ||
|
1cfd32fa13 | ||
|
c8ace611be | ||
|
6057972be4 | ||
|
aac65598a1 | ||
|
45bfc84b20 | ||
|
475031bb37 | ||
|
007ae8d09d | ||
|
f4b6ffa972 | ||
|
83f96286bb | ||
|
656fc51cda | ||
|
7df9fbc3f1 | ||
|
655076c7b0 | ||
|
a9f21e71d6 | ||
|
c9cb56f7f2 | ||
|
6c34d0ede9 | ||
|
d608dde1d7 | ||
|
76ee796101 | ||
|
a69cb1cc9d | ||
|
9f96b16267 | ||
|
389b961e23 | ||
|
b9ca40a921 | ||
|
faec5a4383 | ||
|
6d167e3938 | ||
|
d143f2ad06 | ||
|
1f3154c809 | ||
|
ca8f0290a4 | ||
|
c4955899eb | ||
|
4a45223c97 | ||
|
6426998c39 | ||
|
beb0d04d04 | ||
|
21e052699d | ||
|
87cc34563c | ||
|
7018409531 | ||
|
4485629732 | ||
|
e9456d8d5b | ||
|
ed50e39ba2 | ||
|
fd88dcbccd | ||
|
f35398824b | ||
|
ea5999b96f | ||
|
11ad1132ca | ||
|
6f18aba58b | ||
|
55bd3f34b6 | ||
|
551fe3a6f0 | ||
|
62f1dc8207 | ||
|
fafa563280 | ||
|
4b6ed6bc17 | ||
|
214b7e74f0 | ||
|
a5bc50ee00 | ||
|
3bd418ca9f | ||
|
07b2eb27ec | ||
|
31d309952c | ||
|
7aaf328ffa | ||
|
03a2c06221 | ||
|
ee7841ab13 | ||
|
e1a688e45e | ||
|
ac7fb818cc | ||
|
2aeec9eccc | ||
|
809f39fe42 | ||
|
9fd258db58 | ||
|
7a65650641 | ||
|
0715c838e9 | ||
|
e938ff5e20 | ||
|
3fe813a9ad | ||
|
02cf6fdd85 | ||
|
6b3f4fb875 | ||
|
6da8e679fc | ||
|
62a879dfa0 | ||
|
1bc4d9b013 | ||
|
676304331f | ||
|
aa2d25a57a | ||
|
1af9e5c56d | ||
|
743e91ff02 | ||
|
ce20b5d721 | ||
|
0c96db12c4 | ||
|
abb74e9763 | ||
|
ff43029e01 | ||
|
6ea5c52d29 | ||
|
db400410d8 | ||
|
c447ce1745 | ||
|
1454d4e659 | ||
|
04a429cb8a | ||
|
bddab5e98b | ||
|
fbcadfca9c | ||
|
96bfd05319 | ||
|
28af3deb9f | ||
|
ce16e5d78f | ||
|
068cfb66c2 | ||
|
d9b9876f6e | ||
|
b5badcb5c5 | ||
|
7ba4fbebbc | ||
|
4658c44ec2 | ||
|
d8c72298ec | ||
|
7a56de34ab | ||
|
e5aea7214d | ||
|
3abb92cea8 | ||
|
c2cf7c0184 | ||
|
569a2ae9ef | ||
|
d5408e98bc | ||
|
f3c067d2dc | ||
|
54081dc5c2 | ||
|
f515c25a2c | ||
|
58d5dfc168 | ||
|
29e2c38bc5 | ||
|
34f069a027 | ||
|
097aeb9903 | ||
|
c103ca4b4d | ||
|
921a43c1f6 | ||
|
fec19ea9ff | ||
|
fd85921189 | ||
|
b5f01ae00e | ||
|
778d618acb | ||
|
8e8d8eeff5 | ||
|
33e2941913 | ||
|
9724f75af5 | ||
|
4c27c3c631 | ||
|
47cf53ef2e | ||
|
9d9e5e5a3d | ||
|
d236a959df | ||
|
6359fa0e03 | ||
|
0326c494a9 | ||
|
42191a1dbf | ||
|
f07bb01b18 | ||
|
a7fa65b96e | ||
|
e189b07018 | ||
|
1c09ae547a | ||
|
e0672e2fc3 | ||
|
1da1216c9f | ||
|
49875c533b | ||
|
471825d745 | ||
|
4662be5945 | ||
|
f3d9dc1d87 | ||
|
1112b0c68c | ||
|
6bb38ab67e | ||
|
22d0828959 | ||
|
d74525f764 | ||
|
ad48a30eec | ||
|
873fb06d2a | ||
|
5fde6fcc9b | ||
|
67bd5bad04 | ||
|
3cfcd50b7d | ||
|
94c3c45e73 | ||
|
4c21b76f8f | ||
|
c9101ef2f5 | ||
|
4c36ca57a1 | ||
|
496e58550c | ||
|
ae54aa40bc | ||
|
1ec5903769 | ||
|
9aaf9bed0e | ||
|
23e356deb0 | ||
|
b02121c3a1 | ||
|
86435b1a7d | ||
|
c3396917e8 | ||
|
d43088ee78 | ||
|
f967115097 | ||
|
46f5ad7d2c | ||
|
2c6025bce6 | ||
|
f3412ea748 | ||
|
d25f5fbb88 | ||
|
5527476f67 | ||
|
c9f00eebab | ||
|
cf273c6718 | ||
|
3c2ec1b8ff | ||
|
a7642be106 | ||
|
f2e1c18a79 | ||
|
8a721b35f6 | ||
|
6e18ca6cf4 | ||
|
c1e820a40e | ||
|
19cf4f8086 | ||
|
b075a3bbfd | ||
|
c3357374af | ||
|
77fe02a8e9 | ||
|
fc71ef6e17 | ||
|
f0ce340942 | ||
|
5d978d07a4 | ||
|
05e7001c1a | ||
|
08b50c2c6c | ||
|
cb332bc6b7 | ||
|
4178000933 | ||
|
323af1967c | ||
|
1159a76f9c | ||
|
45805ba322 | ||
|
5afb945835 | ||
|
9c0b55475a | ||
|
7172b423aa | ||
|
d8408fc65f | ||
|
23122f8c57 | ||
|
75ef572207 | ||
|
6e6d9f9e7b | ||
|
51d673384e | ||
|
ec37df5776 | ||
|
cf1eeea343 | ||
|
58ef67abc3 | ||
|
2f3dcbbf20 | ||
|
9e9b65c1db | ||
|
2c4a8d17cd | ||
|
ab0e718dc9 | ||
|
4049cc1ccd | ||
|
8f70adc9c1 | ||
|
45bedfdd73 | ||
|
7b67fc42f9 | ||
|
de8c48cf46 | ||
|
fe25efa327 | ||
|
beed59982d | ||
|
2fa3b70778 | ||
|
afa3e1edcd | ||
|
01a5f47468 | ||
|
b2dea2ab4d | ||
|
f4a7108f73 | ||
|
789034a083 | ||
|
c9482eba5c | ||
|
5e40f9dd0d | ||
|
e87269a7a5 | ||
|
c856d372d1 | ||
|
672dc5a745 | ||
|
0569df0fc9 | ||
|
83b18bab39 | ||
|
fe2e43661e | ||
|
99b02ec0d8 | ||
|
99a030f5ed | ||
|
16a7029841 | ||
|
c0b2a21e09 | ||
|
730cae58da | ||
|
b268b083fc | ||
|
3e642d8427 | ||
|
0548ca8d43 | ||
|
16ce3c2f13 | ||
|
8816486e25 | ||
|
09de16e1ba | ||
|
0a36d7eb9e | ||
|
099287b916 | ||
|
dffd812620 | ||
|
df05cdc578 | ||
|
e93bfe3c74 | ||
|
e961ff7812 | ||
|
374349be31 | ||
|
97f18671c6 | ||
|
8ea8e72a29 | ||
|
5acb7b3edd | ||
|
4477936a19 | ||
|
e4786b9a4b | ||
|
9d8deca0bd | ||
|
c12bc4de58 | ||
|
56bd6aaca9 | ||
|
b076dc01d2 | ||
|
132cb64021 | ||
|
2b577448a7 | ||
|
2ca8b884d0 | ||
|
13b6e33523 | ||
|
066b00aa14 | ||
|
0f3f1cbc62 | ||
|
92c296a63e | ||
|
98de692c3a | ||
|
b9930c63e3 | ||
|
872ae05561 | ||
|
451b2eded7 | ||
|
63d5e83898 | ||
|
eb08590746 | ||
|
39189b9dc7 | ||
|
de1ec9c63a | ||
|
9b7d196cf4 | ||
|
015e69f36d | ||
|
90b22acaa8 | ||
|
360a4636dd | ||
|
2597135af7 | ||
|
56d4016a16 | ||
|
9c7a49b57b | ||
|
75f4be8a9b | ||
|
0b014ec713 | ||
|
1d261710b8 | ||
|
673dfcfac1 | ||
|
d3d6931427 | ||
|
895f5af753 | ||
|
8b63ae37ee | ||
|
41fe247df0 | ||
|
7810c95b5d | ||
|
10e4dbef5d | ||
|
45190265d0 | ||
|
9ae9011bb4 | ||
|
cd093688ae | ||
|
59c78040cd | ||
|
80645074d8 | ||
|
9ab5ef13b5 | ||
|
41f38f4d59 | ||
|
c809f3be86 | ||
|
19ff2a7bd5 | ||
|
b89dac7816 | ||
|
a22be3e1fc | ||
|
5b49e9eebd | ||
|
3752cadc84 | ||
|
4817645de8 | ||
|
a967ef9dce | ||
|
186ef90c55 | ||
|
12ad1f5618 | ||
|
97ffd370f4 | ||
|
a789c01d26 | ||
|
f92f546c44 | ||
|
0ea48a1f23 | ||
|
22e0ea84c8 | ||
|
a5b7b1edc0 | ||
|
f222db9ce6 | ||
|
ef7eaedd63 | ||
|
de0702d065 | ||
|
0e4a6d55e9 | ||
|
173e8bbfb3 | ||
|
c9c1c60f19 | ||
|
47210d0238 | ||
|
cd66f45bfe | ||
|
cb2713bfa8 | ||
|
b7aaabf86f | ||
|
1486ed877a | ||
|
7a8b1590d5 | ||
|
211a46cf82 | ||
|
331a33a1bc | ||
|
3fd81d8740 | ||
|
8e8d3ba8e5 | ||
|
1fdad05332 | ||
|
ed5b981186 | ||
|
a8cc3ad1b0 | ||
|
c3e646b47f | ||
|
7e139aafe0 | ||
|
095472c0da | ||
|
83e72d5f10 | ||
|
83a5b533e2 | ||
|
205c03894b | ||
|
486fd225d4 | ||
|
2f10f4238a | ||
|
6dc5fd7181 | ||
|
663af052c0 | ||
|
cd4915e2c9 | ||
|
8b766d97fd | ||
|
6c5b628eee | ||
|
9c4165adfa | ||
|
ce1ecc6d48 | ||
|
1b62f00d8e | ||
|
7aa54cf749 | ||
|
03e11df547 | ||
|
f0c5ebdc0d | ||
|
15ba5c2731 | ||
|
d13d8d4e5f | ||
|
f41cb81efc | ||
|
d52e91c980 | ||
|
90fae67de9 | ||
|
392555bb0f | ||
|
f9862abdc9 | ||
|
b742792c08 | ||
|
bf5423ea7d | ||
|
8d1e5dbf99 | ||
|
e7dd6ecdd1 | ||
|
b2f4c4b0d4 | ||
|
3204d8e949 | ||
|
cf75c1b4fb | ||
|
829c421b93 | ||
|
9bb0d1b539 | ||
|
276c7463f3 | ||
|
84c9e2f87b | ||
|
44cd54c24e | ||
|
6e358ae704 | ||
|
e70d4ce8d6 | ||
|
00f34af570 | ||
|
9ad43c8b25 | ||
|
5b781a6729 | ||
|
1db8dc4a2b | ||
|
bb84929ec5 | ||
|
cce442ba7c | ||
|
24f25c8af1 | ||
|
4708a349af | ||
|
fb96bc75a7 | ||
|
f8e5ed929c | ||
|
b64f0a5fc7 | ||
|
63986ba653 | ||
|
0bb6242172 | ||
|
31334ecb03 | ||
|
c521c4947e | ||
|
e1fdd3f3d9 | ||
|
d35b028e04 | ||
|
cae67e55f7 | ||
|
846df3e03c | ||
|
1ddfb726b2 | ||
|
32956769e9 | ||
|
7a5e62674f | ||
|
ae128b358e | ||
|
918a745c19 | ||
|
00e6d8ab78 | ||
|
e800f425f2 | ||
|
c9e3527262 | ||
|
24e2b35da2 | ||
|
da99271dcb | ||
|
19320af45a | ||
|
f70ab56e16 | ||
|
b108e45518 | ||
|
764835a5d5 | ||
|
50dacf0581 | ||
|
5ee3522ce5 | ||
|
653d24e092 | ||
|
7919906660 | ||
|
b4085ce66c | ||
|
d3358961db | ||
|
9556da13ba | ||
|
6a71ee861c | ||
|
e7e5298cca | ||
|
9fe17bd344 | ||
|
22c0b72105 | ||
|
1540e053dd | ||
|
eacf9d88f9 | ||
|
049977d042 | ||
|
5cf34cf07e | ||
|
7d8c3dbaba | ||
|
942e67c3a3 | ||
|
28a156b14c | ||
|
7335902d0f | ||
|
0cbe5ee3a9 | ||
|
75e824e8bc | ||
|
1811a0927b | ||
|
288d4f8b91 | ||
|
03424b1b89 | ||
|
ffdd3c9861 | ||
|
343a06a58b | ||
|
c8159c3d03 | ||
|
a5a9cc2ab0 | ||
|
8546f11e49 | ||
|
645889ad25 | ||
|
4fdae9972d | ||
|
94613352b5 | ||
|
548dffb11f | ||
|
85664da6de | ||
|
ed2ec17c54 | ||
|
1724ca8b5c | ||
|
0c6b0c6668 | ||
|
4161828546 | ||
|
71b9ed15f5 | ||
|
0c85071392 | ||
|
71499aafed | ||
|
2e4df4bfaf | ||
|
6164f93ca2 | ||
|
901ed91ce1 | ||
|
ce83033f35 | ||
|
8a16a98e59 | ||
|
dca2d56ff5 | ||
|
37ed3ae338 | ||
|
61f04363db | ||
|
402e2f7cf8 | ||
|
d8fcb5e835 | ||
|
c0cd186f82 | ||
|
30b7213465 | ||
|
e437cc535e | ||
|
9ec3cd2d38 | ||
|
36195a44c3 | ||
|
f58f51637f | ||
|
3c4f84521e | ||
|
7c697725f1 | ||
|
f0ded96ffb | ||
|
e464c180c4 | ||
|
437a79a631 | ||
|
83a4ad53fa | ||
|
8658ef93e3 | ||
|
020a1653a4 | ||
|
c68d524366 | ||
|
0ec0dc85ec | ||
|
8082a771db | ||
|
57c79232a5 | ||
|
47ca6bfb05 | ||
|
31fe72b638 | ||
|
d9cde669c3 | ||
|
f3cab6cf19 | ||
|
6f38c86f45 | ||
|
ec1b28a357 | ||
|
8bb6da4ae6 | ||
|
a559d70856 | ||
|
f2ab8671bf | ||
|
3377b96271 | ||
|
403603f74f | ||
|
6a097cd6c4 | ||
|
83a136ac4a | ||
|
3794e8d6b0 | ||
|
9c1175db9e | ||
|
cbee8f8dc7 | ||
|
2e4c3bf87a | ||
|
89e3037cc9 | ||
|
8e19f54e55 | ||
|
8d41cad743 | ||
|
6a5391afa9 | ||
|
96f6c703b1 | ||
|
3b7003909e | ||
|
050207ec17 | ||
|
e894bd397c | ||
|
b7245f129a | ||
|
b81abd0d1d | ||
|
6113a16ab3 | ||
|
0b5eceb638 | ||
|
258e5c7427 | ||
|
82a5f02c86 | ||
|
963e36f852 | ||
|
77d4384e31 | ||
|
4c075b7090 | ||
|
0f442030c4 | ||
|
b578915045 | ||
|
2201e9b300 | ||
|
b15a4a4a26 | ||
|
eacaaf44c0 | ||
|
c81f40e0fe | ||
|
09fcd88955 | ||
|
b92fd37cb0 | ||
|
e7fa076d94 | ||
|
a6c65e881e | ||
|
52b9ca21ac | ||
|
865a17302b | ||
|
fda91381cd | ||
|
1a8caf94ab | ||
|
adb21613bc | ||
|
2c8c812ff3 | ||
|
70b62288b4 | ||
|
8e7dda219e | ||
|
5e68f8f373 | ||
|
039df3032c | ||
|
8ef38fd9f8 | ||
|
d4714748d8 | ||
|
d421fbda2f | ||
|
a576b02cb9 | ||
|
cb73d83f63 | ||
|
93f30ee67a | ||
|
de90d3e084 | ||
|
3b7e6277be | ||
|
1a2b91971d | ||
|
937afade13 | ||
|
0e191b5ebc | ||
|
bf62af352e | ||
|
8ec77cd74c | ||
|
3321fc55fc | ||
|
ec5d715214 | ||
|
04b833fb81 | ||
|
429fdefcd7 | ||
|
29fd317b4b | ||
|
99d96a2b78 | ||
|
27b1df435f | ||
|
02718e6af4 | ||
|
8c1375b922 | ||
|
84028727cb | ||
|
237c5c0242 | ||
|
3d0145a5a3 | ||
|
42b1f941b0 | ||
|
f2b36d323e | ||
|
b5c01940ac | ||
|
adb85931ab | ||
|
32f3104396 | ||
|
d4486ad2c2 | ||
|
32f904b877 | ||
|
85f7de5c78 | ||
|
ee33aa3f2b | ||
|
8556b795c3 | ||
|
67b888f0f3 | ||
|
504d911e5a | ||
|
835b048113 | ||
|
9d75efc125 | ||
|
562159286d | ||
|
0580ae4b9b | ||
|
cd8528426b | ||
|
fcc864256f | ||
|
f4764b9ab2 | ||
|
cd31c795b0 | ||
|
fddfd9e1f1 | ||
|
e1e9ea4097 | ||
|
c93d67707f | ||
|
ebf776c5b8 | ||
|
302a1ecae3 | ||
|
88961c3eca | ||
|
4a377e1375 | ||
|
1af9f46981 | ||
|
1a8319ea1a | ||
|
c611452fe8 | ||
|
77ae802305 | ||
|
7981795a89 | ||
|
6afafc42fc | ||
|
576c608dac | ||
|
99ba739f6a | ||
|
10bd072488 | ||
|
6c49baf214 | ||
|
a4352768d7 | ||
|
3cc8e98a96 | ||
|
98c67f0f16 | ||
|
d3f3e35f54 | ||
|
a2ae327513 | ||
|
e08d628d42 | ||
|
e3582f7f92 | ||
|
fb83aca503 | ||
|
6411a32c16 | ||
|
93521c94f5 | ||
|
a46a73a677 | ||
|
d76419bd54 | ||
|
7daab4530c | ||
|
421db2ada5 | ||
|
384223b34b | ||
|
54b8489125 | ||
|
ca2869177e | ||
|
8036af01d8 | ||
|
0b237b676d | ||
|
da2fd5acd8 | ||
|
6108b321fc | ||
|
9c31977bcc | ||
|
a54a9cd3b1 | ||
|
445783deea | ||
|
14e5a313d1 | ||
|
db89aa764f | ||
|
2dc1ca847f | ||
|
b1229561e5 | ||
|
b0ad200675 | ||
|
3b94ab1836 | ||
|
96edf638ff | ||
|
d6b30953cc | ||
|
f045d570d3 | ||
|
921cf810d6 | ||
|
4b78d26f11 | ||
|
42bcb12b40 | ||
|
f7b4b3435b | ||
|
d3c7cfeba9 | ||
|
a4313e3b38 | ||
|
7124df9b59 | ||
|
9e8d860761 | ||
|
844f90fba6 | ||
|
07e285be62 | ||
|
097ead306c | ||
|
4fdfb5587f | ||
|
a35b27b14d | ||
|
14a31d6774 | ||
|
045c8df996 | ||
|
ee66f09217 | ||
|
eb53bce493 | ||
|
d752a3c394 | ||
|
df5ddbca48 | ||
|
a339970ac4 | ||
|
a30f8da836 | ||
|
3a70a28254 | ||
|
c7386783a6 | ||
|
e508a2b616 | ||
|
35d60de221 | ||
|
1b2dab346d | ||
|
e80658dacc | ||
|
9f3280c9c4 | ||
|
ef4e8ebdd4 | ||
|
b25ba5b701 | ||
|
f690fb046b | ||
|
606a317805 | ||
|
76ff52f7c9 | ||
|
63ad540d40 | ||
|
0e6ca3948f | ||
|
1e33e2f3ae | ||
|
b68dc582b8 | ||
|
2d0f46e391 | ||
|
bdb9373a32 | ||
|
1e7ecb7be0 | ||
|
341366c67a | ||
|
c3c979c7b8 | ||
|
0fff366e0f | ||
|
6d57cea923 | ||
|
194330c765 | ||
|
af673e0778 | ||
|
eeff964ac1 | ||
|
6fe190576e | ||
|
58d5bf3ae2 | ||
|
e89ba6b3ca | ||
|
c0e6654255 | ||
|
4d5cd6e05d | ||
|
98c9fc2d06 | ||
|
080b749f7d | ||
|
50f7d0a393 | ||
|
5873607e5c | ||
|
0354a70ce8 | ||
|
4b9fc37a48 | ||
|
09f50eb328 | ||
|
f5f4c6ce36 | ||
|
162437627a | ||
|
7212f3c176 | ||
|
4f8fccd11a | ||
|
d9a50173fb | ||
|
4158c64a7e | ||
|
2e907fab47 | ||
|
dda88f5eee | ||
|
deb63b954b | ||
|
1378f26027 | ||
|
76e23cdba3 | ||
|
7826e2dd83 | ||
|
accb325754 | ||
|
442275372d | ||
|
e7ffb21b6b | ||
|
377771d93a | ||
|
afaee31547 | ||
|
fa762db4ed | ||
|
8d854fa93f | ||
|
702c190d47 | ||
|
5a56a532f2 | ||
|
141ddc08d6 | ||
|
c7ce8392e0 | ||
|
189e08b45a | ||
|
30764ab524 | ||
|
a9c317d27c | ||
|
47c93b637e | ||
|
0a07a7d852 | ||
|
186837b05e | ||
|
9318daf2b7 | ||
|
ef7a25a73e | ||
|
beed393c67 | ||
|
aa44b26115 | ||
|
6d14cac77d | ||
|
bdce924e12 | ||
|
3526dff094 | ||
|
15f03b25a6 | ||
|
730fc65465 | ||
|
e99762c031 |
@@ -55,10 +55,6 @@ B. You'll usually want to use wxWindows sources that have the same
|
||||
version number as the wxPython sources you are using. (Another
|
||||
advantage of using CVS is that you'll get both at the same time.)
|
||||
|
||||
NOTE: There probably isn't going to be an official 2.2.2 release
|
||||
for wxMSW so I have taken a snapshot of my workspace and made it
|
||||
available at http://alldunn.com/wxPython/dist/others/
|
||||
|
||||
C. Once you get the sources be sure to put them in a path without a
|
||||
space in it (i.e., NOT c:\Program Files\wx) and set an environment
|
||||
variable named WXWIN to this directory. For example:
|
||||
@@ -80,7 +76,6 @@ D. Change to the wx2\include\wx\msw directory and copy setup0.h to
|
||||
wxUSE_NEW_GRID 1
|
||||
wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
wxUSE_LIBTIFF 1
|
||||
wxUSE_GLCANVAS 1
|
||||
wxDIALOG_UNIT_COMPATIBILITY 0
|
||||
|
||||
I also turn off the following as they are not currently used in
|
||||
@@ -93,11 +88,17 @@ D. Change to the wx2\include\wx\msw directory and copy setup0.h to
|
||||
wxUSE_DIALUP_MANAGER 0
|
||||
wxUSE_DYNLIB_CLASS 0
|
||||
wxUSE_DOC_VIEW_ARCHITECTURE 0
|
||||
wxUSE_MDI_ARCHITECTURE 0
|
||||
wxUSE_PLOT 0
|
||||
wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0
|
||||
|
||||
|
||||
** NEW **
|
||||
Be sure that wxUSE_GLCANVAS is defined to be 0 as wxPython now
|
||||
keeps its own copy of the glcanvas sources and expects that it is
|
||||
not in the main library. This is done to reduce the number of
|
||||
dependant DLLs on the core library and therefore help reduce
|
||||
startup time.
|
||||
|
||||
|
||||
|
||||
2. Build the wxWindows DLL
|
||||
@@ -155,7 +156,7 @@ B. There are three different types of wxWindows DLLs that can be
|
||||
C. Change to the wx2\src\msw directory and type the following command,
|
||||
using the value for FINAL that you want:
|
||||
|
||||
nmake -f makefile.vc dll pch USE_GLCANVAS=1 FINAL=hybrid
|
||||
nmake -f makefile.vc dll pch FINAL=hybrid
|
||||
|
||||
Your machine will then crunch away for possibly a long time,
|
||||
depending on your hardware, and when it's done you should have a
|
||||
|
@@ -2,7 +2,75 @@ CHANGES.txt for wxPython
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
2.3b1
|
||||
?????
|
||||
-----
|
||||
Removed initial startup dependency on the OpenGL DLLs so only the
|
||||
glcanvasc.pyd depends on them.
|
||||
|
||||
Changed wxFont, wxPen, wxBrush to not implicitly use the
|
||||
wxThe[Font|Pen|Brush]List behind the scenes, but to use normal ctor
|
||||
and dtors.
|
||||
|
||||
Exposed the wxThe[Font|Pen|Brush]List to wxPython.
|
||||
|
||||
Also added wxTheColourDatabase and added a library module (in the
|
||||
wxPython.lib.colourdb module) to load LOTS more colour names into the
|
||||
colour database.
|
||||
|
||||
Added wxWakeUpMainThread, wxMutexGuiEnter, wxMutexGuiLeave,
|
||||
wxMutexGuiLocker and wxThread_IsMain to assist with dealing with GUI
|
||||
access from non-GUI threads.
|
||||
|
||||
wxPyOnDemandOutputWindow is now (more) thread safe if non-GUI threads
|
||||
use print, sys.stdout.write, etc.
|
||||
|
||||
Added CreateTextSizer and CreateButtonSizer to wxDialog
|
||||
|
||||
Added wxPython/lib/infoframe.py from Chris Fama. It contains a class
|
||||
that can be used in place of wxPyOnDemandOutputWindow.
|
||||
|
||||
Added colourselect.py, imagebrowser.py and an updated calendar.py to
|
||||
wxPython/lib from Lorne White.
|
||||
|
||||
Added patch to wxPoint_LIST_helper from Tim Hochberg that should make
|
||||
it gobs faster in certain situations.
|
||||
|
||||
Added tools that will take an image file in a wx supported format and
|
||||
convert it to data embedded in a Python source file. The image is
|
||||
converted to XPM format (with its transparency mask intact, if there
|
||||
is one) which is essentially a list of strings containing info about
|
||||
each pixel. It is then pickled and optionally compressed and written
|
||||
to a Python source file along with functions to convert it to either a
|
||||
wxBitmap or a wxImage. See wxPython/demo/images.py for examples, and
|
||||
wxPython/Tools/img2py.py for the implementation.
|
||||
|
||||
Fixed wxStyledTextCtrl to be much faster on wxGTK. There was some
|
||||
experimental code that got left in place that ended up causing way too
|
||||
many refreshes.
|
||||
|
||||
A couple more hacks in my_distutils.py so wxPython can be built with
|
||||
the distutils that comes with Python 2.1.
|
||||
|
||||
Added a ton of missing methods for wxPrintData.
|
||||
|
||||
Switched to InnoSetup for MSW distributions.
|
||||
|
||||
Added wxToggleButton.
|
||||
|
||||
Fixed bug that prevented wxTreeCtrl.OnCompareItems from being called.
|
||||
|
||||
|
||||
|
||||
|
||||
2.2.6
|
||||
-----
|
||||
|
||||
No changes happened in the Python wrappers for this release, only
|
||||
changes and fixes in the wxWindows library.
|
||||
|
||||
|
||||
|
||||
2.2.5
|
||||
-----
|
||||
|
||||
New typemaps for wxString when compiling for Python 2.0 and beyond
|
||||
@@ -15,7 +83,7 @@ Fixed the generic buttons so tool tips work for them.
|
||||
Fixed a bug in the demo's tree control.
|
||||
|
||||
Added a listbox to the listbox demo that shows how to find items with
|
||||
a patching prefix as keys are typed.
|
||||
a matching prefix as keys are typed.
|
||||
|
||||
Added code to the wxListCtrl demo to show how to get text from a
|
||||
column in report mode.
|
||||
@@ -33,6 +101,33 @@ Added wxNotifyEvent.Allow()
|
||||
|
||||
Fixed GOBS of reference leaks.
|
||||
|
||||
Massive code changes and cleanup to allow wxPython to be split into
|
||||
multiple extension modules again. A Python CObject is used to allow
|
||||
the "export" of SWIG functions and other common helper functions from
|
||||
the wxc module to other modules, even if they are in separate shared
|
||||
libraries. Should also be usable from 3rd party code, just include
|
||||
wxPython/src/export.h
|
||||
|
||||
Changed the default setup so the following are built as separate
|
||||
extension modules: calendar, glcanvas, grid, html, ogl, stc, and
|
||||
utils. Will probably add more later.
|
||||
|
||||
Changed the wxPrinterDC to use the new constructor taking a
|
||||
wxPrintData object. The old ctor is still there using the
|
||||
wxPrinterDC2 name.
|
||||
|
||||
Added wxPython.lib.anchors.py from Riaan Booysen. It contains a class
|
||||
that implements Delphi's Anchors with wxLayoutConstraints.
|
||||
|
||||
Added wxPython.lib.fancytext from Timothy Hochberg.
|
||||
|
||||
Changed the GenericButtons to send their event in idle time, so the
|
||||
mouse won't be captured when the event handler is called.
|
||||
|
||||
Added wxPython.lib.rpcMixin from Greg Landrum, although it's not
|
||||
integrated with the demo yet. It allows a wxPython GUI to be an
|
||||
XML-RPC server.
|
||||
|
||||
|
||||
|
||||
New in 2.2.2
|
||||
|
@@ -2,6 +2,11 @@ include *.txt
|
||||
include my_distutils.py
|
||||
## include my_install_data.py
|
||||
include licence/*.txt
|
||||
include b
|
||||
include b.bat
|
||||
|
||||
include SWIG/*
|
||||
exclude SWIG/CVS/*
|
||||
|
||||
include demo/*.py
|
||||
include demo/bitmaps/*.bmp
|
||||
@@ -9,6 +14,11 @@ include demo/bitmaps/*.ico
|
||||
include demo/bitmaps/*.gif
|
||||
include demo/bitmaps/*.png
|
||||
include demo/bitmaps/*.jpg
|
||||
include demo/bmp_source/*.bmp
|
||||
include demo/bmp_source/*.ico
|
||||
include demo/bmp_source/*.gif
|
||||
include demo/bmp_source/*.png
|
||||
include demo/bmp_source/*.jpg
|
||||
include demo/README.txt
|
||||
include demo/*.xml
|
||||
include demo/data/*.png
|
||||
@@ -20,6 +30,17 @@ include demo/data/*.i
|
||||
include demo/data/*.h
|
||||
include demo/data/*.py
|
||||
|
||||
include samples/doodle/*.txt
|
||||
include samples/doodle/*.py
|
||||
include samples/doodle/sample.ddl
|
||||
include samples/stxview/*.txt
|
||||
include samples/stxview/*.py
|
||||
include samples/stxview/*.stx
|
||||
include samples/stxview/StructuredText/*.py
|
||||
include samples/stxview/StructuredText/*.txt
|
||||
include samples/wxProject/*.txt
|
||||
include samples/wxProject/*.py
|
||||
|
||||
include wxPython/lib/*.py
|
||||
include wxPython/lib/*.txt
|
||||
include wxPython/lib/editor/*.py
|
||||
@@ -27,7 +48,6 @@ include wxPython/lib/editor/*.txt
|
||||
|
||||
exclude wxPython/*
|
||||
exclude tests
|
||||
exclude SWIG
|
||||
|
||||
include src/*.i
|
||||
include src/*.py
|
||||
|
@@ -50,7 +50,7 @@ multiple sources. See the http://wxPython.org/ for details on various
|
||||
sources of help, but probably the best source is the wxPython-users
|
||||
mail list. You can view the archive or subscribe by going to
|
||||
|
||||
http://lists.sourceforge.net/mailman/listinfo/wxpython-users
|
||||
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
|
||||
|
||||
Or you can send mail directly to the list using this address:
|
||||
|
||||
@@ -73,6 +73,7 @@ Please also see the following files in this directory:
|
||||
licence/* Text of the wxWindows license.
|
||||
|
||||
|
||||
|
||||
-----------------
|
||||
Robin Dunn
|
||||
robin@alldunn.com
|
||||
@@ -83,3 +84,5 @@ robin@alldunn.com
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
35
wxPython/b
@@ -6,6 +6,9 @@ if [ "$1" = "15" ]; then
|
||||
elif [ "$1" = "20" ]; then
|
||||
PYVER=2.0
|
||||
shift
|
||||
elif [ "$1" = "21" ]; then
|
||||
PYVER=2.1
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
@@ -21,6 +24,11 @@ if [ "$1" = "c" ]; then
|
||||
CMD="$SETUP $FLAGS $OTHERFLAGS clean"
|
||||
OTHERCMD="rm -f wxPython/*.so"
|
||||
|
||||
# "d" --> clean extension modules only
|
||||
elif [ "$1" = "d" ]; then
|
||||
shift
|
||||
CMD="rm -f wxPython/*.so"
|
||||
|
||||
# "i" --> install
|
||||
elif [ "$1" = "i" ]; then
|
||||
shift
|
||||
@@ -33,8 +41,31 @@ elif [ "$1" = "s" ]; then
|
||||
|
||||
# "r" --> rpm dist
|
||||
elif [ "$1" = "r" ]; then
|
||||
shift
|
||||
CMD="$SETUP $OTHERFLAGS bdist_rpm"
|
||||
|
||||
# save the original
|
||||
cp setup.py setup.py.save
|
||||
|
||||
# fix up setup.py the way we want...
|
||||
sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save > setup.py.temp
|
||||
sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp > setup.py
|
||||
|
||||
# build wxPython-gl RPM
|
||||
$SETUP $OTHERFLAGS bdist_rpm --binary-only --doc-files README.txt
|
||||
rm dist/wxPython-gl*.tar.gz
|
||||
|
||||
# Build wxPython RPM
|
||||
cp setup.py setup.py.temp
|
||||
sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp > setup.py
|
||||
$SETUP $OTHERFLAGS bdist_rpm
|
||||
|
||||
# put the oringal back
|
||||
cp setup.py.save setup.py
|
||||
rm setup.py.*
|
||||
|
||||
# rebuild the source dist without the munched up setup.py
|
||||
$SETUP $OTHERFLAGS sdist
|
||||
exit 0
|
||||
|
||||
|
||||
# (no command arg) --> normal build for development
|
||||
else
|
||||
|
@@ -5,14 +5,17 @@ set FLAGS=USE_SWIG=1 IN_CVS_TREE=1
|
||||
|
||||
|
||||
rem Use non-default python?
|
||||
iff "%1" == "15" .or. "%1" == "20" then
|
||||
set SETUP=c:\tools\python%1%\python.exe -u setup.py
|
||||
iff "%1" == "15" .or. "%1" == "20" .or. "%1" == "21" then
|
||||
set PYTHON=c:\tools\python%1%\python.exe
|
||||
shift
|
||||
else
|
||||
set SETUP=python -u setup.py
|
||||
set PYTHON=python
|
||||
endiff
|
||||
set SETUP=%PYTHON% -u setup.py
|
||||
|
||||
|
||||
%PYTHON% -c "import sys;print '\n', sys.version, '\n'"
|
||||
|
||||
|
||||
rem "c" --> clean
|
||||
iff "%1" == "c" then
|
||||
@@ -30,6 +33,11 @@ elseiff "%1" == "i" then
|
||||
shift
|
||||
set CMD=%SETUP% build install
|
||||
|
||||
rem "r" --> make installer
|
||||
elseiff "%1" == "r" then
|
||||
shift
|
||||
set CMD=%PYTHON% distrib\make_installer.py
|
||||
|
||||
rem "s" --> source dist
|
||||
elseiff "%1" == "s" then
|
||||
shift
|
||||
|
@@ -14,8 +14,13 @@
|
||||
%module glcanvas
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#ifdef __WXMSW__
|
||||
#include "myglcanvas.h"
|
||||
#else
|
||||
#include <wx/glcanvas.h>
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -35,14 +40,6 @@
|
||||
%extern events.i
|
||||
|
||||
|
||||
%{
|
||||
#if defined(__WXMSW__)
|
||||
static wxString wxPyEmptyStr("");
|
||||
static wxPoint wxPyDefaultPosition(-1, -1);
|
||||
static wxSize wxPyDefaultSize(-1, -1);
|
||||
#endif
|
||||
%}
|
||||
|
||||
%pragma(python) code = "import wx"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -99,8 +96,8 @@ public:
|
||||
class wxGLCanvas : public wxScrolledWindow {
|
||||
public:
|
||||
wxGLCanvas(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxPyDefaultPosition,
|
||||
const wxSize& size = wxPyDefaultSize, long style = 0,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const char* name = "GLCanvas",
|
||||
int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
@@ -55,17 +55,22 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#define SWIG_name "glcanvasc"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#ifdef __WXMSW__
|
||||
#include "myglcanvas.h"
|
||||
#else
|
||||
#include <wx/glcanvas.h>
|
||||
#endif
|
||||
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -82,34 +87,32 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
static wxString wxPyEmptyStr("");
|
||||
static wxPoint wxPyDefaultPosition(-1, -1);
|
||||
static wxSize wxPyDefaultSize(-1, -1);
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
static char* wxStringErrorMsg = "String or Unicode type required";
|
||||
#else
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -467,8 +470,8 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *
|
||||
wxGLCanvas * _result;
|
||||
wxWindow * _arg0;
|
||||
wxWindowID _arg1 = (wxWindowID ) -1;
|
||||
wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition;
|
||||
wxSize * _arg3 = (wxSize *) &wxPyDefaultSize;
|
||||
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
|
||||
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
|
||||
long _arg4 = (long ) 0;
|
||||
char * _arg5 = (char *) "GLCanvas";
|
||||
int * _arg6 = (int *) NULL;
|
||||
@@ -731,6 +734,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxPyProcess","_class_wxPyProcess",0},
|
||||
{ "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0},
|
||||
{ "_wxImageHandler","_class_wxImageHandler",0},
|
||||
{ "_wxMutexGuiLocker","_class_wxMutexGuiLocker",0},
|
||||
{ "_wxLog","_class_wxLog",0},
|
||||
{ "_class_wxToolBarBase","_wxToolBarBase",0},
|
||||
{ "_wxMask","_class_wxMask",0},
|
||||
@@ -746,6 +750,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObject","_class_wxDataObject",0},
|
||||
{ "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
|
||||
{ "_wxStaticBox","_class_wxStaticBox",0},
|
||||
{ "_wxColourDatabase","_class_wxColourDatabase",0},
|
||||
{ "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
|
||||
{ "_wxPyDropSource","_class_wxPyDropSource",0},
|
||||
{ "_wxChoice","_class_wxChoice",0},
|
||||
@@ -826,6 +831,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxStaticLine","_class_wxStaticLine",0},
|
||||
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
|
||||
{ "_wxBrush","_class_wxBrush",0},
|
||||
{ "_wxToggleButton","_class_wxToggleButton",0},
|
||||
{ "_wxMiniFrame","_class_wxMiniFrame",0},
|
||||
{ "_class_wxNotebookEvent","_wxNotebookEvent",0},
|
||||
{ "_class_wxPyPrintout","_wxPyPrintout",0},
|
||||
@@ -862,6 +868,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxZipFSHandler","_wxZipFSHandler",0},
|
||||
{ "_char","_wxChar",0},
|
||||
{ "_wxBitmap","_class_wxBitmap",0},
|
||||
{ "_wxPenList","_class_wxPenList",0},
|
||||
{ "_wxPrintDialog","_class_wxPrintDialog",0},
|
||||
{ "_wxWindowDC","_class_wxWindowDC",0},
|
||||
{ "_wxTimerEvent","_class_wxTimerEvent",0},
|
||||
@@ -876,6 +883,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxMessageDialog","_class_wxMessageDialog",0},
|
||||
{ "_class_wxValidator","_wxValidator",0},
|
||||
{ "_class_wxPyEvent","_wxPyEvent",0},
|
||||
{ "_class_wxMutexGuiLocker","_wxMutexGuiLocker",0},
|
||||
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
|
||||
{ "_wxConfig","_class_wxConfig",0},
|
||||
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
|
||||
@@ -888,6 +896,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxToolBar","_wxToolBar",0},
|
||||
{ "_wxDropTarget","_class_wxDropTarget",0},
|
||||
{ "_class_wxStaticLine","_wxStaticLine",0},
|
||||
{ "_class_wxColourDatabase","_wxColourDatabase",0},
|
||||
{ "_wxScrollEvent","_class_wxScrollEvent",0},
|
||||
{ "_wxToolBarToolBase","_class_wxToolBarToolBase",0},
|
||||
{ "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0},
|
||||
@@ -916,9 +925,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
|
||||
{ "_wxGenericDragImage","_class_wxGenericDragImage",0},
|
||||
{ "_class_wxProgressDialog","_wxProgressDialog",0},
|
||||
{ "_class_wxBrushList","_wxBrushList",0},
|
||||
{ "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
|
||||
{ "_wxPyInputStream","_class_wxPyInputStream",0},
|
||||
{ "_wxPyApp","_class_wxPyApp",0},
|
||||
{ "_class_wxPenList","_wxPenList",0},
|
||||
{ "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
|
||||
{ "_class_wxOutputStream","_wxOutputStream",0},
|
||||
{ "_wxLogTextCtrl","_class_wxLogTextCtrl",0},
|
||||
@@ -981,9 +992,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxCloseEvent","_wxCloseEvent",0},
|
||||
{ "_wxSashEvent","_class_wxSashEvent",0},
|
||||
{ "_wxBusyInfo","_class_wxBusyInfo",0},
|
||||
{ "_wxFontList","_class_wxFontList",0},
|
||||
{ "_class_wxMenuEvent","_wxMenuEvent",0},
|
||||
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
|
||||
{ "_wxJoystick","_class_wxJoystick",0},
|
||||
{ "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
|
||||
{ "_wxClientDC","_class_wxClientDC",0},
|
||||
{ "_wxMouseEvent","_class_wxMouseEvent",0},
|
||||
@@ -1146,6 +1157,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
|
||||
{ "_class_wxJoystickEvent","_wxJoystickEvent",0},
|
||||
{ "_class_wxTipProvider","_wxTipProvider",0},
|
||||
{ "_class_wxToggleButton","_wxToggleButton",0},
|
||||
{ "_class_wxMiniFrame","_wxMiniFrame",0},
|
||||
{ "_wxFontDialog","_class_wxFontDialog",0},
|
||||
{ "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0},
|
||||
@@ -1164,12 +1176,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxGauge","_class_wxGauge",0},
|
||||
{ "_class_wxCheckListBox","_wxCheckListBox",0},
|
||||
{ "_class_wxBusyInfo","_wxBusyInfo",0},
|
||||
{ "_class_wxJoystick","_wxJoystick",0},
|
||||
{ "_class_wxFontList","_wxFontList",0},
|
||||
{ "_class_wxCommandEvent","_wxCommandEvent",0},
|
||||
{ "_class_wxClientDC","_wxClientDC",0},
|
||||
{ "_class_wxSizeEvent","_wxSizeEvent",0},
|
||||
{ "_class_wxListCtrl","_wxListCtrl",0},
|
||||
{ "_class_wxGLCanvas","_wxGLCanvas",0},
|
||||
{ "_wxBrushList","_class_wxBrushList",0},
|
||||
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
|
||||
{ "_class_wxLogNull","_wxLogNull",0},
|
||||
{ "_class_wxSize","_wxSize",0},
|
||||
|
@@ -55,17 +55,22 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#define SWIG_name "glcanvasc"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#ifdef __WXMSW__
|
||||
#include "myglcanvas.h"
|
||||
#else
|
||||
#include <wx/glcanvas.h>
|
||||
#endif
|
||||
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -82,34 +87,32 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
static wxString wxPyEmptyStr("");
|
||||
static wxPoint wxPyDefaultPosition(-1, -1);
|
||||
static wxSize wxPyDefaultSize(-1, -1);
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
static char* wxStringErrorMsg = "String or Unicode type required";
|
||||
#else
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -341,8 +344,8 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *
|
||||
wxGLCanvas * _result;
|
||||
wxWindow * _arg0;
|
||||
wxWindowID _arg1 = (wxWindowID ) -1;
|
||||
wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition;
|
||||
wxSize * _arg3 = (wxSize *) &wxPyDefaultSize;
|
||||
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
|
||||
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
|
||||
long _arg4 = (long ) 0;
|
||||
char * _arg5 = (char *) "GLCanvas";
|
||||
int * _arg6 = (int *) NULL;
|
||||
@@ -601,6 +604,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxPyProcess","_class_wxPyProcess",0},
|
||||
{ "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0},
|
||||
{ "_wxImageHandler","_class_wxImageHandler",0},
|
||||
{ "_wxMutexGuiLocker","_class_wxMutexGuiLocker",0},
|
||||
{ "_wxLog","_class_wxLog",0},
|
||||
{ "_class_wxToolBarBase","_wxToolBarBase",0},
|
||||
{ "_wxMask","_class_wxMask",0},
|
||||
@@ -616,6 +620,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObject","_class_wxDataObject",0},
|
||||
{ "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
|
||||
{ "_wxStaticBox","_class_wxStaticBox",0},
|
||||
{ "_wxColourDatabase","_class_wxColourDatabase",0},
|
||||
{ "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
|
||||
{ "_wxPyDropSource","_class_wxPyDropSource",0},
|
||||
{ "_wxChoice","_class_wxChoice",0},
|
||||
@@ -659,9 +664,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxRealPoint","_wxRealPoint",0},
|
||||
{ "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0},
|
||||
{ "_wxPNMHandler","_class_wxPNMHandler",0},
|
||||
{ "_wxPrinterDC","_class_wxPrinterDC",0},
|
||||
{ "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0},
|
||||
{ "_wxLogGui","_class_wxLogGui",0},
|
||||
{ "_wxPrinterDC","_class_wxPrinterDC",0},
|
||||
{ "_class_wxMenuItem","_wxMenuItem",0},
|
||||
{ "_class_wxPaintEvent","_wxPaintEvent",0},
|
||||
{ "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0},
|
||||
@@ -696,6 +701,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxStaticLine","_class_wxStaticLine",0},
|
||||
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
|
||||
{ "_wxBrush","_class_wxBrush",0},
|
||||
{ "_wxToggleButton","_class_wxToggleButton",0},
|
||||
{ "_wxMiniFrame","_class_wxMiniFrame",0},
|
||||
{ "_class_wxNotebookEvent","_wxNotebookEvent",0},
|
||||
{ "_class_wxPyPrintout","_wxPyPrintout",0},
|
||||
@@ -732,6 +738,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxZipFSHandler","_wxZipFSHandler",0},
|
||||
{ "_char","_wxChar",0},
|
||||
{ "_wxBitmap","_class_wxBitmap",0},
|
||||
{ "_wxPenList","_class_wxPenList",0},
|
||||
{ "_wxTaskBarIcon","_class_wxTaskBarIcon",0},
|
||||
{ "_wxPrintDialog","_class_wxPrintDialog",0},
|
||||
{ "_wxWindowDC","_class_wxWindowDC",0},
|
||||
@@ -747,6 +754,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxMessageDialog","_class_wxMessageDialog",0},
|
||||
{ "_class_wxValidator","_wxValidator",0},
|
||||
{ "_class_wxPyEvent","_wxPyEvent",0},
|
||||
{ "_class_wxMutexGuiLocker","_wxMutexGuiLocker",0},
|
||||
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
|
||||
{ "_wxConfig","_class_wxConfig",0},
|
||||
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
|
||||
@@ -759,6 +767,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxToolBar","_wxToolBar",0},
|
||||
{ "_wxDropTarget","_class_wxDropTarget",0},
|
||||
{ "_class_wxStaticLine","_wxStaticLine",0},
|
||||
{ "_class_wxColourDatabase","_wxColourDatabase",0},
|
||||
{ "_wxScrollEvent","_class_wxScrollEvent",0},
|
||||
{ "_wxToolBarToolBase","_class_wxToolBarToolBase",0},
|
||||
{ "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0},
|
||||
@@ -787,9 +796,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
|
||||
{ "_wxGenericDragImage","_class_wxGenericDragImage",0},
|
||||
{ "_class_wxProgressDialog","_wxProgressDialog",0},
|
||||
{ "_class_wxBrushList","_wxBrushList",0},
|
||||
{ "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
|
||||
{ "_wxPyInputStream","_class_wxPyInputStream",0},
|
||||
{ "_wxPyApp","_class_wxPyApp",0},
|
||||
{ "_class_wxPenList","_wxPenList",0},
|
||||
{ "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
|
||||
{ "_class_wxOutputStream","_wxOutputStream",0},
|
||||
{ "_wxLogTextCtrl","_class_wxLogTextCtrl",0},
|
||||
@@ -853,6 +864,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxCloseEvent","_wxCloseEvent",0},
|
||||
{ "_wxSashEvent","_class_wxSashEvent",0},
|
||||
{ "_wxBusyInfo","_class_wxBusyInfo",0},
|
||||
{ "_wxFontList","_class_wxFontList",0},
|
||||
{ "_class_wxMenuEvent","_wxMenuEvent",0},
|
||||
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
|
||||
{ "_wxJoystick","_class_wxJoystick",0},
|
||||
@@ -978,12 +990,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxPyApp","_wxPyApp",0},
|
||||
{ "_wxSize","_class_wxSize",0},
|
||||
{ "_wxRegionIterator","_class_wxRegionIterator",0},
|
||||
{ "_class_wxPrinterDC","_wxPrinterDC",0},
|
||||
{ "_class_wxPyTextDataObject","_wxPyTextDataObject",0},
|
||||
{ "_class_wxLogTextCtrl","_wxLogTextCtrl",0},
|
||||
{ "_class_wxLogGui","_wxLogGui",0},
|
||||
{ "_class_wxMDIParentFrame","_wxMDIParentFrame",0},
|
||||
{ "_wxPyTreeItemData","_class_wxPyTreeItemData",0},
|
||||
{ "_class_wxPrinterDC","_wxPrinterDC",0},
|
||||
{ "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0},
|
||||
{ "_class_wxTimeSpan","_wxTimeSpan",0},
|
||||
{ "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0},
|
||||
@@ -1020,6 +1032,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
|
||||
{ "_class_wxJoystickEvent","_wxJoystickEvent",0},
|
||||
{ "_class_wxTipProvider","_wxTipProvider",0},
|
||||
{ "_class_wxToggleButton","_wxToggleButton",0},
|
||||
{ "_class_wxMiniFrame","_wxMiniFrame",0},
|
||||
{ "_wxFontDialog","_class_wxFontDialog",0},
|
||||
{ "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0},
|
||||
@@ -1038,12 +1051,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxGauge","_class_wxGauge",0},
|
||||
{ "_class_wxCheckListBox","_wxCheckListBox",0},
|
||||
{ "_class_wxBusyInfo","_wxBusyInfo",0},
|
||||
{ "_class_wxFontList","_wxFontList",0},
|
||||
{ "_class_wxJoystick","_wxJoystick",0},
|
||||
{ "_class_wxCommandEvent","_wxCommandEvent",0},
|
||||
{ "_class_wxClientDC","_wxClientDC",0},
|
||||
{ "_class_wxSizeEvent","_wxSizeEvent",0},
|
||||
{ "_class_wxListCtrl","_wxListCtrl",0},
|
||||
{ "_class_wxGLCanvas","_wxGLCanvas",0},
|
||||
{ "_wxBrushList","_class_wxBrushList",0},
|
||||
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
|
||||
{ "_class_wxLogNull","_wxLogNull",0},
|
||||
{ "_class_wxSize","_wxSize",0},
|
||||
|
720
wxPython/contrib/glcanvas/msw/myglcanvas.cpp
Normal file
@@ -0,0 +1,720 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: glcanvas.cpp
|
||||
// Purpose: wxGLCanvas, for using OpenGL with wxWindows under MS Windows
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "glcanvas.h"
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#if defined(__BORLANDC__)
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include <wx/setup.h>
|
||||
|
||||
|
||||
#undef wxUSE_GLCANVAS
|
||||
#define wxUSE_GLCANVAS 1
|
||||
#if wxUSE_GLCANVAS
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/frame.h>
|
||||
#endif
|
||||
|
||||
#include <wx/msw/private.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
#include "myglcanvas.h"
|
||||
|
||||
wxChar wxGLCanvasClassName[] = wxT("wxGLCanvasClass");
|
||||
|
||||
LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message,
|
||||
WPARAM wParam, LPARAM lParam);
|
||||
|
||||
/*
|
||||
* GLContext implementation
|
||||
*/
|
||||
|
||||
wxGLContext::wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette)
|
||||
{
|
||||
m_window = win;
|
||||
|
||||
m_hDC = win->GetHDC();
|
||||
|
||||
m_glContext = wglCreateContext((HDC) m_hDC);
|
||||
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGl context") );
|
||||
|
||||
wglMakeCurrent((HDC) m_hDC, m_glContext);
|
||||
}
|
||||
|
||||
wxGLContext::wxGLContext(
|
||||
bool isRGB, wxGLCanvas *win,
|
||||
const wxPalette& palette,
|
||||
const wxGLContext *other /* for sharing display lists */
|
||||
)
|
||||
{
|
||||
m_window = win;
|
||||
|
||||
m_hDC = win->GetHDC();
|
||||
|
||||
m_glContext = wglCreateContext((HDC) m_hDC);
|
||||
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGl context") );
|
||||
|
||||
if( other != 0 )
|
||||
wglShareLists( other->m_glContext, m_glContext );
|
||||
|
||||
wglMakeCurrent((HDC) m_hDC, m_glContext);
|
||||
}
|
||||
|
||||
wxGLContext::~wxGLContext()
|
||||
{
|
||||
if (m_glContext)
|
||||
{
|
||||
wglMakeCurrent(NULL, NULL);
|
||||
wglDeleteContext(m_glContext);
|
||||
}
|
||||
}
|
||||
|
||||
void wxGLContext::SwapBuffers()
|
||||
{
|
||||
if (m_glContext)
|
||||
{
|
||||
wglMakeCurrent((HDC) m_hDC, m_glContext);
|
||||
::SwapBuffers((HDC) m_hDC); //blits the backbuffer into DC
|
||||
}
|
||||
}
|
||||
|
||||
void wxGLContext::SetCurrent()
|
||||
{
|
||||
if (m_glContext)
|
||||
{
|
||||
wglMakeCurrent((HDC) m_hDC, m_glContext);
|
||||
}
|
||||
|
||||
/*
|
||||
setupPixelFormat(hDC);
|
||||
setupPalette(hDC);
|
||||
*/
|
||||
}
|
||||
|
||||
void wxGLContext::SetColour(const char *colour)
|
||||
{
|
||||
float r = 0.0;
|
||||
float g = 0.0;
|
||||
float b = 0.0;
|
||||
wxColour *col = wxTheColourDatabase->FindColour(colour);
|
||||
if (col)
|
||||
{
|
||||
r = (float)(col->Red()/256.0);
|
||||
g = (float)(col->Green()/256.0);
|
||||
b = (float)(col->Blue()/256.0);
|
||||
glColor3f( r, g, b);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* wxGLCanvas implementation
|
||||
*/
|
||||
|
||||
IMPLEMENT_CLASS(wxGLCanvas, wxScrolledWindow)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxGLCanvas, wxScrolledWindow)
|
||||
EVT_SIZE(wxGLCanvas::OnSize)
|
||||
EVT_PALETTE_CHANGED(wxGLCanvas::OnPaletteChanged)
|
||||
EVT_QUERY_NEW_PALETTE(wxGLCanvas::OnQueryNewPalette)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxGLCanvas::wxGLCanvas(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name,
|
||||
int *attribList, const wxPalette& palette) : wxScrolledWindow()
|
||||
{
|
||||
m_glContext = (wxGLContext*) NULL;
|
||||
|
||||
bool ret = Create(parent, id, pos, size, style, name);
|
||||
|
||||
if ( ret )
|
||||
{
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
|
||||
}
|
||||
|
||||
m_hDC = (WXHDC) ::GetDC((HWND) GetHWND());
|
||||
|
||||
SetupPixelFormat(attribList);
|
||||
SetupPalette(palette);
|
||||
|
||||
m_glContext = new wxGLContext(TRUE, this, palette);
|
||||
}
|
||||
|
||||
wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
||||
const wxGLContext *shared, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name,
|
||||
int *attribList, const wxPalette& palette )
|
||||
: wxScrolledWindow()
|
||||
{
|
||||
m_glContext = (wxGLContext*) NULL;
|
||||
|
||||
bool ret = Create(parent, id, pos, size, style, name);
|
||||
|
||||
if ( ret )
|
||||
{
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
|
||||
}
|
||||
|
||||
m_hDC = (WXHDC) ::GetDC((HWND) GetHWND());
|
||||
|
||||
SetupPixelFormat(attribList);
|
||||
SetupPalette(palette);
|
||||
|
||||
m_glContext = new wxGLContext(TRUE, this, palette, shared );
|
||||
}
|
||||
|
||||
// Not very useful for wxMSW, but this is to be wxGTK compliant
|
||||
|
||||
wxGLCanvas::wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name,
|
||||
int *attribList, const wxPalette& palette ):
|
||||
wxScrolledWindow()
|
||||
{
|
||||
m_glContext = (wxGLContext*) NULL;
|
||||
|
||||
bool ret = Create(parent, id, pos, size, style, name);
|
||||
|
||||
if ( ret )
|
||||
{
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
|
||||
}
|
||||
|
||||
m_hDC = (WXHDC) ::GetDC((HWND) GetHWND());
|
||||
|
||||
SetupPixelFormat(attribList);
|
||||
SetupPalette(palette);
|
||||
|
||||
wxGLContext *sharedContext=0;
|
||||
if (shared) sharedContext=shared->GetContext();
|
||||
m_glContext = new wxGLContext(TRUE, this, palette, sharedContext );
|
||||
}
|
||||
|
||||
wxGLCanvas::~wxGLCanvas()
|
||||
{
|
||||
if (m_glContext)
|
||||
delete m_glContext;
|
||||
|
||||
::ReleaseDC((HWND) GetHWND(), (HDC) m_hDC);
|
||||
}
|
||||
|
||||
// Replaces wxWindow::Create functionality, since we need to use a different window class
|
||||
bool wxGLCanvas::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name)
|
||||
{
|
||||
/*
|
||||
Suggestion from Kelly Brock <kbrock@8cs.com> (not yet implemented):
|
||||
|
||||
OpenGL corruption fix is simple assuming it doesn't screw anything else
|
||||
up. Add the following line to the top of the create function:
|
||||
|
||||
wxSize parentSize = GetClientSize();
|
||||
|
||||
All locations within the function that use 'size' are changed to
|
||||
'parentSize'.
|
||||
The above corrects the initial display corruption with the GeForce and
|
||||
TNT2, not sure about other NVidia cards yet.
|
||||
*/
|
||||
|
||||
static bool registeredGLCanvasClass = FALSE;
|
||||
|
||||
// We have to register a special window class because we need
|
||||
// the CS_OWNDC style for GLCanvas.
|
||||
|
||||
/*
|
||||
From Angel Popov <jumpo@bitex.com>
|
||||
|
||||
Here are two snips from a dicussion in the OpenGL Gamedev list that explains
|
||||
how this problem can be fixed:
|
||||
|
||||
"There are 5 common DCs available in Win95. These are aquired when you call
|
||||
GetDC or GetDCEx from a window that does _not_ have the OWNDC flag.
|
||||
OWNDC flagged windows do not get their DC from the common DC pool, the issue
|
||||
is they require 800 bytes each from the limited 64Kb local heap for GDI."
|
||||
|
||||
"The deal is, if you hold onto one of the 5 shared DC's too long (as GL apps
|
||||
do), Win95 will actually "steal" it from you. MakeCurrent fails,
|
||||
apparently, because Windows re-assigns the HDC to a different window. The
|
||||
only way to prevent this, the only reliable means, is to set CS_OWNDC."
|
||||
*/
|
||||
|
||||
if (!registeredGLCanvasClass)
|
||||
{
|
||||
WNDCLASS wndclass;
|
||||
|
||||
static const long styleNormal = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC;
|
||||
|
||||
// the fields which are common to all classes
|
||||
wndclass.lpfnWndProc = (WNDPROC)wxWndProc;
|
||||
wndclass.cbClsExtra = 0;
|
||||
wndclass.cbWndExtra = sizeof( DWORD ); // VZ: what is this DWORD used for?
|
||||
wndclass.hInstance = wxhInstance;
|
||||
wndclass.hIcon = (HICON) NULL;
|
||||
wndclass.hCursor = ::LoadCursor((HINSTANCE)NULL, IDC_ARROW);
|
||||
wndclass.lpszMenuName = NULL;
|
||||
|
||||
// Register the GLCanvas class name
|
||||
wndclass.hbrBackground = (HBRUSH)NULL;
|
||||
wndclass.lpszClassName = wxGLCanvasClassName;
|
||||
wndclass.style = styleNormal;
|
||||
|
||||
if ( !RegisterClass(&wndclass) )
|
||||
{
|
||||
wxLogLastError(wxT("RegisterClass(wxGLCanvasClass)"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
registeredGLCanvasClass = TRUE;
|
||||
}
|
||||
|
||||
wxCHECK_MSG( parent, FALSE, wxT("can't create wxWindow without parent") );
|
||||
|
||||
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
|
||||
parent->AddChild(this);
|
||||
|
||||
DWORD msflags = 0;
|
||||
if ( style & wxBORDER )
|
||||
msflags |= WS_BORDER;
|
||||
if ( style & wxTHICK_FRAME )
|
||||
msflags |= WS_THICKFRAME;
|
||||
|
||||
/*
|
||||
A general rule with OpenGL and Win32 is that any window that will have a
|
||||
HGLRC built for it must have two flags: WS_CLIPCHILDREN & WS_CLIPSIBLINGS.
|
||||
You can find references about this within the knowledge base and most OpenGL
|
||||
books that contain the wgl function descriptions.
|
||||
*/
|
||||
|
||||
msflags |= WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS;
|
||||
// if ( style & wxCLIP_CHILDREN )
|
||||
// msflags |= WS_CLIPCHILDREN;
|
||||
msflags |= WS_CLIPCHILDREN;
|
||||
|
||||
bool want3D;
|
||||
WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D);
|
||||
|
||||
// Even with extended styles, need to combine with WS_BORDER
|
||||
// for them to look right.
|
||||
if ( want3D || (m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER ) ||
|
||||
(m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER))
|
||||
{
|
||||
msflags |= WS_BORDER;
|
||||
}
|
||||
|
||||
// calculate the value to return from WM_GETDLGCODE handler
|
||||
if ( GetWindowStyleFlag() & wxWANTS_CHARS )
|
||||
{
|
||||
// want everything: i.e. all keys and WM_CHAR message
|
||||
m_lDlgCode = DLGC_WANTARROWS | DLGC_WANTCHARS |
|
||||
DLGC_WANTTAB | DLGC_WANTMESSAGE;
|
||||
}
|
||||
|
||||
MSWCreate(m_windowId, parent, wxGLCanvasClassName, this, NULL,
|
||||
pos.x, pos.y,
|
||||
WidthDefault(size.x), HeightDefault(size.y),
|
||||
msflags, NULL, exStyle);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC)
|
||||
{
|
||||
int pixelFormat;
|
||||
PIXELFORMATDESCRIPTOR pfd = {
|
||||
sizeof(PIXELFORMATDESCRIPTOR), /* size */
|
||||
1, /* version */
|
||||
PFD_SUPPORT_OPENGL |
|
||||
PFD_DRAW_TO_WINDOW |
|
||||
PFD_DOUBLEBUFFER, /* support double-buffering */
|
||||
PFD_TYPE_RGBA, /* color type */
|
||||
16, /* prefered color depth */
|
||||
0, 0, 0, 0, 0, 0, /* color bits (ignored) */
|
||||
0, /* no alpha buffer */
|
||||
0, /* alpha bits (ignored) */
|
||||
0, /* no accumulation buffer */
|
||||
0, 0, 0, 0, /* accum bits (ignored) */
|
||||
16, /* depth buffer */
|
||||
0, /* no stencil buffer */
|
||||
0, /* no auxiliary buffers */
|
||||
PFD_MAIN_PLANE, /* main layer */
|
||||
0, /* reserved */
|
||||
0, 0, 0, /* no layer, visible, damage masks */
|
||||
};
|
||||
|
||||
if (attribList) {
|
||||
pfd.dwFlags &= ~PFD_DOUBLEBUFFER;
|
||||
pfd.iPixelType = PFD_TYPE_COLORINDEX;
|
||||
pfd.cColorBits = 0;
|
||||
int arg=0;
|
||||
|
||||
while( (attribList[arg]!=0) )
|
||||
{
|
||||
switch( attribList[arg++] )
|
||||
{
|
||||
case WX_GL_RGBA:
|
||||
pfd.iPixelType = PFD_TYPE_RGBA;
|
||||
break;
|
||||
case WX_GL_BUFFER_SIZE:
|
||||
pfd.cColorBits = attribList[arg++];
|
||||
break;
|
||||
case WX_GL_LEVEL:
|
||||
// this member looks like it may be obsolete
|
||||
if (attribList[arg] > 0) {
|
||||
pfd.iLayerType = PFD_OVERLAY_PLANE;
|
||||
} else if (attribList[arg] < 0) {
|
||||
pfd.iLayerType = PFD_UNDERLAY_PLANE;
|
||||
} else {
|
||||
pfd.iLayerType = PFD_MAIN_PLANE;
|
||||
}
|
||||
arg++;
|
||||
break;
|
||||
case WX_GL_DOUBLEBUFFER:
|
||||
pfd.dwFlags |= PFD_DOUBLEBUFFER;
|
||||
break;
|
||||
case WX_GL_STEREO:
|
||||
pfd.dwFlags |= PFD_STEREO;
|
||||
break;
|
||||
case WX_GL_AUX_BUFFERS:
|
||||
pfd.cAuxBuffers = attribList[arg++];
|
||||
break;
|
||||
case WX_GL_MIN_RED:
|
||||
pfd.cColorBits += (pfd.cRedBits = attribList[arg++]);
|
||||
break;
|
||||
case WX_GL_MIN_GREEN:
|
||||
pfd.cColorBits += (pfd.cGreenBits = attribList[arg++]);
|
||||
break;
|
||||
case WX_GL_MIN_BLUE:
|
||||
pfd.cColorBits += (pfd.cBlueBits = attribList[arg++]);
|
||||
break;
|
||||
case WX_GL_MIN_ALPHA:
|
||||
// doesn't count in cColorBits
|
||||
pfd.cAlphaBits = attribList[arg++];
|
||||
break;
|
||||
case WX_GL_DEPTH_SIZE:
|
||||
pfd.cDepthBits = attribList[arg++];
|
||||
break;
|
||||
case WX_GL_STENCIL_SIZE:
|
||||
pfd.cStencilBits = attribList[arg++];
|
||||
break;
|
||||
case WX_GL_MIN_ACCUM_RED:
|
||||
pfd.cAccumBits += (pfd.cAccumRedBits = attribList[arg++]);
|
||||
break;
|
||||
case WX_GL_MIN_ACCUM_GREEN:
|
||||
pfd.cAccumBits += (pfd.cAccumGreenBits = attribList[arg++]);
|
||||
break;
|
||||
case WX_GL_MIN_ACCUM_BLUE:
|
||||
pfd.cAccumBits += (pfd.cAccumBlueBits = attribList[arg++]);
|
||||
break;
|
||||
case WX_GL_MIN_ACCUM_ALPHA:
|
||||
pfd.cAccumBits += (pfd.cAccumAlphaBits = attribList[arg++]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd);
|
||||
if (pixelFormat == 0) {
|
||||
MessageBox(WindowFromDC((HDC) m_hDC), wxT("ChoosePixelFormat failed."), wxT("Error"),
|
||||
MB_ICONERROR | MB_OK);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) != TRUE) {
|
||||
MessageBox(WindowFromDC((HDC) m_hDC), wxT("SetPixelFormat failed."), wxT("Error"),
|
||||
MB_ICONERROR | MB_OK);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
void wxGLCanvas::SetupPalette(const wxPalette& palette)
|
||||
{
|
||||
int pixelFormat = GetPixelFormat((HDC) m_hDC);
|
||||
PIXELFORMATDESCRIPTOR pfd;
|
||||
|
||||
DescribePixelFormat((HDC) m_hDC, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
|
||||
|
||||
if (pfd.dwFlags & PFD_NEED_PALETTE)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_palette = palette;
|
||||
|
||||
if ( !m_palette.Ok() )
|
||||
{
|
||||
m_palette = CreateDefaultPalette();
|
||||
}
|
||||
|
||||
if (m_palette.Ok())
|
||||
{
|
||||
SelectPalette((HDC) m_hDC, (HPALETTE) m_palette.GetHPALETTE(), FALSE);
|
||||
RealizePalette((HDC) m_hDC);
|
||||
}
|
||||
}
|
||||
|
||||
wxPalette wxGLCanvas::CreateDefaultPalette()
|
||||
{
|
||||
PIXELFORMATDESCRIPTOR pfd;
|
||||
int paletteSize;
|
||||
int pixelFormat = GetPixelFormat((HDC) m_hDC);
|
||||
|
||||
DescribePixelFormat((HDC) m_hDC, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
|
||||
|
||||
paletteSize = 1 << pfd.cColorBits;
|
||||
|
||||
LOGPALETTE* pPal =
|
||||
(LOGPALETTE*) malloc(sizeof(LOGPALETTE) + paletteSize * sizeof(PALETTEENTRY));
|
||||
pPal->palVersion = 0x300;
|
||||
pPal->palNumEntries = paletteSize;
|
||||
|
||||
/* build a simple RGB color palette */
|
||||
{
|
||||
int redMask = (1 << pfd.cRedBits) - 1;
|
||||
int greenMask = (1 << pfd.cGreenBits) - 1;
|
||||
int blueMask = (1 << pfd.cBlueBits) - 1;
|
||||
int i;
|
||||
|
||||
for (i=0; i<paletteSize; ++i) {
|
||||
pPal->palPalEntry[i].peRed =
|
||||
(((i >> pfd.cRedShift) & redMask) * 255) / redMask;
|
||||
pPal->palPalEntry[i].peGreen =
|
||||
(((i >> pfd.cGreenShift) & greenMask) * 255) / greenMask;
|
||||
pPal->palPalEntry[i].peBlue =
|
||||
(((i >> pfd.cBlueShift) & blueMask) * 255) / blueMask;
|
||||
pPal->palPalEntry[i].peFlags = 0;
|
||||
}
|
||||
}
|
||||
|
||||
HPALETTE hPalette = CreatePalette(pPal);
|
||||
free(pPal);
|
||||
|
||||
wxPalette palette;
|
||||
palette.SetHPALETTE((WXHPALETTE) hPalette);
|
||||
|
||||
return palette;
|
||||
}
|
||||
|
||||
void wxGLCanvas::SwapBuffers()
|
||||
{
|
||||
if (m_glContext)
|
||||
m_glContext->SwapBuffers();
|
||||
}
|
||||
|
||||
void wxGLCanvas::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
int width, height;
|
||||
GetClientSize(& width, & height);
|
||||
|
||||
if (m_glContext)
|
||||
{
|
||||
m_glContext->SetCurrent();
|
||||
|
||||
glViewport(0, 0, (GLint)width, (GLint)height);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 );
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
}
|
||||
}
|
||||
|
||||
void wxGLCanvas::SetCurrent()
|
||||
{
|
||||
if (m_glContext)
|
||||
{
|
||||
m_glContext->SetCurrent();
|
||||
}
|
||||
}
|
||||
|
||||
void wxGLCanvas::SetColour(const char *colour)
|
||||
{
|
||||
if (m_glContext)
|
||||
m_glContext->SetColour(colour);
|
||||
}
|
||||
|
||||
// TODO: Have to have this called by parent frame (?)
|
||||
// So we need wxFrame to call OnQueryNewPalette for all children...
|
||||
void wxGLCanvas::OnQueryNewPalette(wxQueryNewPaletteEvent& event)
|
||||
{
|
||||
/* realize palette if this is the current window */
|
||||
if ( GetPalette()->Ok() ) {
|
||||
::UnrealizeObject((HPALETTE) GetPalette()->GetHPALETTE());
|
||||
::SelectPalette((HDC) GetHDC(), (HPALETTE) GetPalette()->GetHPALETTE(), FALSE);
|
||||
::RealizePalette((HDC) GetHDC());
|
||||
Refresh();
|
||||
event.SetPaletteRealized(TRUE);
|
||||
}
|
||||
else
|
||||
event.SetPaletteRealized(FALSE);
|
||||
}
|
||||
|
||||
// I think this doesn't have to be propagated to child windows.
|
||||
void wxGLCanvas::OnPaletteChanged(wxPaletteChangedEvent& event)
|
||||
{
|
||||
/* realize palette if this is *not* the current window */
|
||||
if ( GetPalette() &&
|
||||
GetPalette()->Ok() && (this != event.GetChangedWindow()) )
|
||||
{
|
||||
::UnrealizeObject((HPALETTE) GetPalette()->GetHPALETTE());
|
||||
::SelectPalette((HDC) GetHDC(), (HPALETTE) GetPalette()->GetHPALETTE(), FALSE);
|
||||
::RealizePalette((HDC) GetHDC());
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
/* Give extensions proper function names. */
|
||||
|
||||
/* EXT_vertex_array */
|
||||
void glArrayElementEXT(GLint i)
|
||||
{
|
||||
}
|
||||
|
||||
void glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
|
||||
{
|
||||
}
|
||||
|
||||
void glDrawArraysEXT(GLenum mode, GLint first, GLsizei count)
|
||||
{
|
||||
#ifdef GL_EXT_vertex_array
|
||||
static PFNGLDRAWARRAYSEXTPROC proc = 0;
|
||||
|
||||
if ( !proc )
|
||||
{
|
||||
proc = (PFNGLDRAWARRAYSEXTPROC) wglGetProcAddress("glDrawArraysEXT");
|
||||
}
|
||||
|
||||
if ( proc )
|
||||
(* proc) (mode, first, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
void glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *pointer)
|
||||
{
|
||||
}
|
||||
|
||||
void glGetPointervEXT(GLenum pname, GLvoid* *params)
|
||||
{
|
||||
}
|
||||
|
||||
void glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
|
||||
{
|
||||
}
|
||||
|
||||
void glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
|
||||
{
|
||||
#ifdef GL_EXT_vertex_array
|
||||
static PFNGLNORMALPOINTEREXTPROC proc = 0;
|
||||
|
||||
if ( !proc )
|
||||
{
|
||||
proc = (PFNGLNORMALPOINTEREXTPROC) wglGetProcAddress("glNormalPointerEXT");
|
||||
}
|
||||
|
||||
if ( proc )
|
||||
(* proc) (type, stride, count, pointer);
|
||||
#endif
|
||||
}
|
||||
|
||||
void glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
|
||||
{
|
||||
}
|
||||
|
||||
void glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
|
||||
{
|
||||
#ifdef GL_EXT_vertex_array
|
||||
static PFNGLVERTEXPOINTEREXTPROC proc = 0;
|
||||
|
||||
if ( !proc )
|
||||
{
|
||||
proc = (PFNGLVERTEXPOINTEREXTPROC) wglGetProcAddress("glVertexPointerEXT");
|
||||
}
|
||||
if ( proc )
|
||||
(* proc) (size, type, stride, count, pointer);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* EXT_color_subtable */
|
||||
void glColorSubtableEXT(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *table)
|
||||
{
|
||||
}
|
||||
|
||||
/* EXT_color_table */
|
||||
void glColorTableEXT(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)
|
||||
{
|
||||
}
|
||||
|
||||
void glCopyColorTableEXT(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
|
||||
{
|
||||
}
|
||||
|
||||
void glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid *table)
|
||||
{
|
||||
}
|
||||
|
||||
void glGetColorTableParamaterfvEXT(GLenum target, GLenum pname, GLfloat *params)
|
||||
{
|
||||
}
|
||||
|
||||
void glGetColorTavleParameterivEXT(GLenum target, GLenum pname, GLint *params)
|
||||
{
|
||||
}
|
||||
|
||||
/* SGI_compiled_vertex_array */
|
||||
void glLockArraysSGI(GLint first, GLsizei count)
|
||||
{
|
||||
}
|
||||
|
||||
void glUnlockArraysSGI()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/* SGI_cull_vertex */
|
||||
void glCullParameterdvSGI(GLenum pname, GLdouble* params)
|
||||
{
|
||||
}
|
||||
|
||||
void glCullParameterfvSGI(GLenum pname, GLfloat* params)
|
||||
{
|
||||
}
|
||||
|
||||
/* SGI_index_func */
|
||||
void glIndexFuncSGI(GLenum func, GLclampf ref)
|
||||
{
|
||||
}
|
||||
|
||||
/* SGI_index_material */
|
||||
void glIndexMaterialSGI(GLenum face, GLenum mode)
|
||||
{
|
||||
}
|
||||
|
||||
/* WIN_swap_hint */
|
||||
void glAddSwapHintRectWin(GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
// wxUSE_GLCANVAS
|
141
wxPython/contrib/glcanvas/msw/myglcanvas.h
Normal file
@@ -0,0 +1,141 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: glcanvas.h
|
||||
// Purpose: wxGLCanvas, for using OpenGL with wxWindows under Windows
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "glcanvas.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WX_GLCANVAS_H_
|
||||
#define _WX_GLCANVAS_H_
|
||||
|
||||
#include <wx/setup.h>
|
||||
|
||||
|
||||
#undef wxUSE_GLCANVAS
|
||||
#define wxUSE_GLCANVAS 1
|
||||
#if wxUSE_GLCANVAS
|
||||
|
||||
#include <wx/palette.h>
|
||||
#include <wx/scrolwin.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "gl/gl.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Constants for attriblist
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// The generic GL implementation doesn't support most of these options,
|
||||
// such as stereo, auxiliary buffers, alpha channel, and accum buffer.
|
||||
// Other implementations may actually support them.
|
||||
|
||||
enum
|
||||
{
|
||||
WX_GL_RGBA=1, /* use true color palette */
|
||||
WX_GL_BUFFER_SIZE, /* bits for buffer if not WX_GL_RGBA */
|
||||
WX_GL_LEVEL, /* 0 for main buffer, >0 for overlay, <0 for underlay */
|
||||
WX_GL_DOUBLEBUFFER, /* use doublebuffer */
|
||||
WX_GL_STEREO, /* use stereoscopic display */
|
||||
WX_GL_AUX_BUFFERS, /* number of auxiliary buffers */
|
||||
WX_GL_MIN_RED, /* use red buffer with most bits (> MIN_RED bits) */
|
||||
WX_GL_MIN_GREEN, /* use green buffer with most bits (> MIN_GREEN bits) */
|
||||
WX_GL_MIN_BLUE, /* use blue buffer with most bits (> MIN_BLUE bits) */
|
||||
WX_GL_MIN_ALPHA, /* use blue buffer with most bits (> MIN_ALPHA bits) */
|
||||
WX_GL_DEPTH_SIZE, /* bits for Z-buffer (0,16,32) */
|
||||
WX_GL_STENCIL_SIZE, /* bits for stencil buffer */
|
||||
WX_GL_MIN_ACCUM_RED, /* use red accum buffer with most bits (> MIN_ACCUM_RED bits) */
|
||||
WX_GL_MIN_ACCUM_GREEN, /* use green buffer with most bits (> MIN_ACCUM_GREEN bits) */
|
||||
WX_GL_MIN_ACCUM_BLUE, /* use blue buffer with most bits (> MIN_ACCUM_BLUE bits) */
|
||||
WX_GL_MIN_ACCUM_ALPHA /* use blue buffer with most bits (> MIN_ACCUM_ALPHA bits) */
|
||||
};
|
||||
|
||||
class wxGLCanvas; /* forward reference */
|
||||
|
||||
class wxGLContext: public wxObject
|
||||
{
|
||||
public:
|
||||
wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette = wxNullPalette);
|
||||
wxGLContext(
|
||||
bool isRGB, wxGLCanvas *win,
|
||||
const wxPalette& WXUNUSED(palette),
|
||||
const wxGLContext *other /* for sharing display lists */
|
||||
);
|
||||
~wxGLContext();
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SwapBuffers();
|
||||
|
||||
|
||||
inline wxWindow* GetWindow() const { return m_window; }
|
||||
inline WXHDC GetHDC() const { return m_hDC; }
|
||||
inline HGLRC GetGLRC() const { return m_glContext; }
|
||||
|
||||
public:
|
||||
HGLRC m_glContext;
|
||||
WXHDC m_hDC;
|
||||
wxWindow* m_window;
|
||||
};
|
||||
|
||||
class wxGLCanvas: public wxScrolledWindow
|
||||
{
|
||||
DECLARE_CLASS(wxGLCanvas)
|
||||
public:
|
||||
wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette);
|
||||
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
|
||||
wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "GLCanvas",
|
||||
int *attribList = (int*) NULL, const wxPalette& palette = wxNullPalette );
|
||||
|
||||
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette );
|
||||
|
||||
~wxGLCanvas();
|
||||
|
||||
// Replaces wxWindow::Create functionality, since we need to use a different window class
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name);
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SwapBuffers();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
void OnQueryNewPalette(wxQueryNewPaletteEvent& event);
|
||||
void OnPaletteChanged(wxPaletteChangedEvent& event);
|
||||
|
||||
inline wxGLContext* GetContext() const { return m_glContext; }
|
||||
|
||||
inline WXHDC GetHDC() const { return m_hDC; }
|
||||
void SetupPixelFormat(int *attribList = (int*) NULL);
|
||||
void SetupPalette(const wxPalette& palette);
|
||||
wxPalette CreateDefaultPalette();
|
||||
|
||||
inline wxPalette* GetPalette() const { return (wxPalette*) & m_palette; }
|
||||
|
||||
protected:
|
||||
wxGLContext* m_glContext; // this is typedef-ed ptr, in fact
|
||||
wxPalette m_palette;
|
||||
WXHDC m_hDC;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// wxUSE_GLCANVAS
|
||||
#endif
|
||||
// _WX_GLCANVAS_H_
|
||||
|
17
wxPython/contrib/glcanvas/myglcanvas.h
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// For MSW I keep my own copy of the glcanvas code. This lets me build
|
||||
// the main wxWindows library without OpenGL support and the DLL
|
||||
// depenencies that go along with it. The DLL dependencies will then
|
||||
// be localized to this extension module, will not need to be loaded
|
||||
// when the core is started up, and won't make the core unrunnable on
|
||||
// systems that don't have OpenGL.
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "msw/myglcanvas.h"
|
||||
#else
|
||||
#include <wx/glcanvas.h>
|
||||
#endif
|
@@ -1,24 +0,0 @@
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
#if defined(__WIN32__)
|
||||
# if defined(_MSC_VER)
|
||||
# define SWIGEXPORT(a) __declspec(dllexport) a
|
||||
# else
|
||||
# if defined(__BORLANDC__)
|
||||
# define SWIGEXPORT(a) a _export
|
||||
# else
|
||||
# define SWIGEXPORT(a) a
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
SWIGEXPORT(void) initglcanvasc() {
|
||||
}
|
||||
|
||||
|
@@ -54,6 +54,68 @@ class wxPyControlPoint;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Typemaps just for OGL
|
||||
|
||||
|
||||
// wxOGL doesn't use a ref-counted copy of pens and brushes, so we'll
|
||||
// use the pen and brush lists to simulate that...
|
||||
|
||||
|
||||
%typemap(python, in) wxPen* {
|
||||
wxPen* temp;
|
||||
if ($source) {
|
||||
if ($source == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
$target = wxThePenList->FindOrCreatePen(temp->GetColour(),
|
||||
temp->GetWidth(),
|
||||
temp->GetStyle());
|
||||
else
|
||||
$target = NULL;
|
||||
}
|
||||
|
||||
%typemap(python, in) wxBrush* {
|
||||
wxBrush* temp;
|
||||
if ($source) {
|
||||
if ($source == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxBrush_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
$target = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
|
||||
else
|
||||
$target = NULL;
|
||||
}
|
||||
|
||||
|
||||
%typemap(python, in) wxFont* {
|
||||
wxFont* temp;
|
||||
if ($source) {
|
||||
if ($source == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxFont_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
$target = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
|
||||
temp->GetFamily(),
|
||||
temp->GetStyle(),
|
||||
temp->GetWeight(),
|
||||
temp->GetUnderlined(),
|
||||
temp->GetFaceName(),
|
||||
temp->GetEncoding());
|
||||
else
|
||||
$target = NULL;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
@@ -55,17 +55,17 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#define SWIG_name "oglc"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -82,29 +82,114 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
static char* wxStringErrorMsg = "String or Unicode type required";
|
||||
#else
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// This one will work for any class for the VERY generic cases, but beyond that
|
||||
// the helper needs to know more about the type.
|
||||
|
||||
wxList* wxPy_wxListHelper(PyObject* pyList, char* className) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* pyo = PyList_GetItem(pyList, x);
|
||||
wxObject* wxo = NULL;
|
||||
|
||||
if (SWIG_GetPtrObj(pyo, (void **)&wxo, className)) {
|
||||
char errmsg[1024];
|
||||
sprintf(errmsg, "Type error, expected list of %s objects", className);
|
||||
PyErr_SetString(PyExc_TypeError, errmsg);
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append(wxo);
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* pyo = PyList_GetItem(pyList, x);
|
||||
|
||||
if (PyTuple_Check(pyo)) {
|
||||
PyObject* o1 = PyNumber_Float(PyTuple_GetItem(pyo, 0));
|
||||
PyObject* o2 = PyNumber_Float(PyTuple_GetItem(pyo, 1));
|
||||
|
||||
double val1 = (o1 ? PyFloat_AsDouble(o1) : 0.0);
|
||||
double val2 = (o2 ? PyFloat_AsDouble(o2) : 0.0);
|
||||
|
||||
list->Append((wxObject*) new wxRealPoint(val1, val2));
|
||||
|
||||
} else {
|
||||
wxRealPoint* wxo = NULL;
|
||||
if (SWIG_GetPtrObj(pyo, (void **)&wxo, "_wxRealPoint_p")) {
|
||||
PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append((wxObject*) new wxRealPoint(*wxo));
|
||||
}
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
extern "C" SWIGEXPORT(void) initoglbasicc();
|
||||
extern "C" SWIGEXPORT(void) initoglshapesc();
|
||||
@@ -205,6 +290,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0},
|
||||
{ "_wxImageHandler","_class_wxImageHandler",0},
|
||||
{ "_class_wxPyRectangleShape","_wxPyRectangleShape",0},
|
||||
{ "_wxMutexGuiLocker","_class_wxMutexGuiLocker",0},
|
||||
{ "_wxLog","_class_wxLog",0},
|
||||
{ "_class_wxToolBarBase","_wxToolBarBase",0},
|
||||
{ "_wxMask","_class_wxMask",0},
|
||||
@@ -223,6 +309,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObject","_class_wxDataObject",0},
|
||||
{ "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
|
||||
{ "_wxStaticBox","_class_wxStaticBox",0},
|
||||
{ "_wxColourDatabase","_class_wxColourDatabase",0},
|
||||
{ "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
|
||||
{ "_wxPyDropSource","_class_wxPyDropSource",0},
|
||||
{ "_wxChoice","_class_wxChoice",0},
|
||||
@@ -306,6 +393,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxStaticLine","_class_wxStaticLine",0},
|
||||
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
|
||||
{ "_wxBrush","_class_wxBrush",0},
|
||||
{ "_wxToggleButton","_class_wxToggleButton",0},
|
||||
{ "_wxMiniFrame","_class_wxMiniFrame",0},
|
||||
{ "_class_wxNotebookEvent","_wxNotebookEvent",0},
|
||||
{ "_class_wxPyPrintout","_wxPyPrintout",0},
|
||||
@@ -345,6 +433,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxZipFSHandler","_wxZipFSHandler",0},
|
||||
{ "_char","_wxChar",0},
|
||||
{ "_wxBitmap","_class_wxBitmap",0},
|
||||
{ "_wxPenList","_class_wxPenList",0},
|
||||
{ "_wxPrintDialog","_class_wxPrintDialog",0},
|
||||
{ "_wxPyControlPoint","_class_wxPyControlPoint",0},
|
||||
{ "_wxWindowDC","_class_wxWindowDC",0},
|
||||
@@ -360,6 +449,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxMessageDialog","_class_wxMessageDialog",0},
|
||||
{ "_class_wxValidator","_wxValidator",0},
|
||||
{ "_class_wxPyEvent","_wxPyEvent",0},
|
||||
{ "_class_wxMutexGuiLocker","_wxMutexGuiLocker",0},
|
||||
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
|
||||
{ "_wxConfig","_class_wxConfig",0},
|
||||
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
|
||||
@@ -374,6 +464,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxToolBar","_wxToolBar",0},
|
||||
{ "_wxDropTarget","_class_wxDropTarget",0},
|
||||
{ "_class_wxStaticLine","_wxStaticLine",0},
|
||||
{ "_class_wxColourDatabase","_wxColourDatabase",0},
|
||||
{ "_wxScrollEvent","_class_wxScrollEvent",0},
|
||||
{ "_wxToolBarToolBase","_class_wxToolBarToolBase",0},
|
||||
{ "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0},
|
||||
@@ -405,9 +496,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxPyShapeCanvas","_wxPyShapeCanvas",0},
|
||||
{ "_wxGenericDragImage","_class_wxGenericDragImage",0},
|
||||
{ "_class_wxProgressDialog","_wxProgressDialog",0},
|
||||
{ "_class_wxBrushList","_wxBrushList",0},
|
||||
{ "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
|
||||
{ "_wxPyInputStream","_class_wxPyInputStream",0},
|
||||
{ "_wxPyApp","_class_wxPyApp",0},
|
||||
{ "_class_wxPenList","_wxPenList",0},
|
||||
{ "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
|
||||
{ "_class_wxOutputStream","_wxOutputStream",0},
|
||||
{ "_wxLogTextCtrl","_class_wxLogTextCtrl",0},
|
||||
@@ -469,9 +562,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxCloseEvent","_wxCloseEvent",0},
|
||||
{ "_wxSashEvent","_class_wxSashEvent",0},
|
||||
{ "_wxBusyInfo","_class_wxBusyInfo",0},
|
||||
{ "_wxFontList","_class_wxFontList",0},
|
||||
{ "_class_wxMenuEvent","_wxMenuEvent",0},
|
||||
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
|
||||
{ "_wxJoystick","_class_wxJoystick",0},
|
||||
{ "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
|
||||
{ "_class_wxPyCircleShape","_wxPyCircleShape",0},
|
||||
{ "_wxClientDC","_class_wxClientDC",0},
|
||||
@@ -639,6 +732,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
|
||||
{ "_class_wxJoystickEvent","_wxJoystickEvent",0},
|
||||
{ "_class_wxTipProvider","_wxTipProvider",0},
|
||||
{ "_class_wxToggleButton","_wxToggleButton",0},
|
||||
{ "_class_wxMiniFrame","_wxMiniFrame",0},
|
||||
{ "_wxFontDialog","_class_wxFontDialog",0},
|
||||
{ "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0},
|
||||
@@ -658,12 +752,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxGauge","_class_wxGauge",0},
|
||||
{ "_class_wxCheckListBox","_wxCheckListBox",0},
|
||||
{ "_class_wxBusyInfo","_wxBusyInfo",0},
|
||||
{ "_class_wxJoystick","_wxJoystick",0},
|
||||
{ "_class_wxFontList","_wxFontList",0},
|
||||
{ "_class_wxCommandEvent","_wxCommandEvent",0},
|
||||
{ "_class_wxClientDC","_wxClientDC",0},
|
||||
{ "_class_wxSizeEvent","_wxSizeEvent",0},
|
||||
{ "_class_wxListCtrl","_wxListCtrl",0},
|
||||
{ "_class_wxPyDividedShape","_wxPyDividedShape",0},
|
||||
{ "_wxBrushList","_class_wxBrushList",0},
|
||||
{ "_wxPyEllipseShape","_class_wxPyEllipseShape",0},
|
||||
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
|
||||
{ "_class_wxLogNull","_wxLogNull",0},
|
||||
|
@@ -14,7 +14,7 @@
|
||||
%module ogl
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
%}
|
||||
|
||||
@@ -133,10 +133,88 @@ void wxOGLInitialize();
|
||||
void wxOGLCleanUp();
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
%{
|
||||
//---------------------------------------------------------------------------
|
||||
// This one will work for any class for the VERY generic cases, but beyond that
|
||||
// the helper needs to know more about the type.
|
||||
|
||||
wxList* wxPy_wxListHelper(PyObject* pyList, char* className) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* pyo = PyList_GetItem(pyList, x);
|
||||
wxObject* wxo = NULL;
|
||||
|
||||
if (SWIG_GetPtrObj(pyo, (void **)&wxo, className)) {
|
||||
char errmsg[1024];
|
||||
sprintf(errmsg, "Type error, expected list of %s objects", className);
|
||||
PyErr_SetString(PyExc_TypeError, errmsg);
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append(wxo);
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* pyo = PyList_GetItem(pyList, x);
|
||||
|
||||
if (PyTuple_Check(pyo)) {
|
||||
PyObject* o1 = PyNumber_Float(PyTuple_GetItem(pyo, 0));
|
||||
PyObject* o2 = PyNumber_Float(PyTuple_GetItem(pyo, 1));
|
||||
|
||||
double val1 = (o1 ? PyFloat_AsDouble(o1) : 0.0);
|
||||
double val2 = (o2 ? PyFloat_AsDouble(o2) : 0.0);
|
||||
|
||||
list->Append((wxObject*) new wxRealPoint(val1, val2));
|
||||
|
||||
} else {
|
||||
wxRealPoint* wxo = NULL;
|
||||
if (SWIG_GetPtrObj(pyo, (void **)&wxo, "_wxRealPoint_p")) {
|
||||
PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append((wxObject*) new wxRealPoint(*wxo));
|
||||
}
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
extern "C" SWIGEXPORT(void) initoglbasicc();
|
||||
extern "C" SWIGEXPORT(void) initoglshapesc();
|
||||
extern "C" SWIGEXPORT(void) initoglshapes2c();
|
||||
|
@@ -55,17 +55,17 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#define SWIG_name "oglbasicc"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -82,29 +82,33 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
static char* wxStringErrorMsg = "String or Unicode type required";
|
||||
#else
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#endif
|
||||
|
||||
WXSHAPE_IMP_CALLBACKS(wxPyShapeEvtHandler,wxShapeEvtHandler);
|
||||
|
||||
@@ -160,7 +164,7 @@ static PyObject *_wrap_wxShapeRegion_SetText(PyObject *self, PyObject *args, PyO
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -194,11 +198,11 @@ static PyObject *_wrap_wxShapeRegion_SetFont(PyObject *self, PyObject *args, PyO
|
||||
wxShapeRegion * _arg0;
|
||||
wxFont * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","f", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxShapeRegion_SetFont",_kwnames,&_argo0,&_argo1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxShapeRegion_SetFont",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -207,13 +211,26 @@ static PyObject *_wrap_wxShapeRegion_SetFont(PyObject *self, PyObject *args, PyO
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxShapeRegion_SetFont. Expected _wxFont_p.");
|
||||
{
|
||||
wxFont* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxFont_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
|
||||
temp->GetFamily(),
|
||||
temp->GetStyle(),
|
||||
temp->GetWeight(),
|
||||
temp->GetUnderlined(),
|
||||
temp->GetFaceName(),
|
||||
temp->GetEncoding());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxShapeRegion_SetFont(_arg0,_arg1);
|
||||
@@ -391,7 +408,7 @@ static PyObject *_wrap_wxShapeRegion_SetName(PyObject *self, PyObject *args, PyO
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -442,7 +459,7 @@ static PyObject *_wrap_wxShapeRegion_SetColour(PyObject *self, PyObject *args, P
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -994,7 +1011,7 @@ static PyObject *_wrap_wxShapeRegion_SetPenColour(PyObject *self, PyObject *args
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -4293,11 +4310,11 @@ static PyObject *_wrap_wxPyShape_SetPen(PyObject *self, PyObject *args, PyObject
|
||||
wxPyShape * _arg0;
|
||||
wxPen * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","pen", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShape_SetPen",_kwnames,&_argo0,&_argo1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShape_SetPen",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -4306,13 +4323,22 @@ static PyObject *_wrap_wxPyShape_SetPen(PyObject *self, PyObject *args, PyObject
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_SetPen. Expected _wxPen_p.");
|
||||
{
|
||||
wxPen* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
|
||||
temp->GetWidth(),
|
||||
temp->GetStyle());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxPyShape_SetPen(_arg0,_arg1);
|
||||
@@ -4329,11 +4355,11 @@ static PyObject *_wrap_wxPyShape_SetBrush(PyObject *self, PyObject *args, PyObje
|
||||
wxPyShape * _arg0;
|
||||
wxBrush * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","brush", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShape_SetBrush",_kwnames,&_argo0,&_argo1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShape_SetBrush",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -4342,13 +4368,20 @@ static PyObject *_wrap_wxPyShape_SetBrush(PyObject *self, PyObject *args, PyObje
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_SetBrush. Expected _wxBrush_p.");
|
||||
{
|
||||
wxBrush* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxBrush_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxPyShape_SetBrush(_arg0,_arg1);
|
||||
@@ -4998,7 +5031,7 @@ static PyObject *_wrap_wxPyShape_AddText(PyObject *self, PyObject *args, PyObjec
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -5154,7 +5187,7 @@ static PyObject *_wrap_wxPyShape_FormatText(PyObject *self, PyObject *args, PyOb
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -5246,11 +5279,11 @@ static PyObject *_wrap_wxPyShape_SetFont(PyObject *self, PyObject *args, PyObjec
|
||||
wxFont * _arg1;
|
||||
int _arg2 = (int ) 0;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","font","regionId", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyShape_SetFont",_kwnames,&_argo0,&_argo1,&_arg2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyShape_SetFont",_kwnames,&_argo0,&_obj1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -5259,13 +5292,26 @@ static PyObject *_wrap_wxPyShape_SetFont(PyObject *self, PyObject *args, PyObjec
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_SetFont. Expected _wxFont_p.");
|
||||
{
|
||||
wxFont* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxFont_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
|
||||
temp->GetFamily(),
|
||||
temp->GetStyle(),
|
||||
temp->GetWeight(),
|
||||
temp->GetUnderlined(),
|
||||
temp->GetFaceName(),
|
||||
temp->GetEncoding());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxPyShape_SetFont(_arg0,_arg1,_arg2);
|
||||
@@ -5335,7 +5381,7 @@ static PyObject *_wrap_wxPyShape_SetTextColour(PyObject *self, PyObject *args, P
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -5447,7 +5493,7 @@ static PyObject *_wrap_wxPyShape_SetRegionName(PyObject *self, PyObject *args, P
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -5532,7 +5578,7 @@ static PyObject *_wrap_wxPyShape_GetRegionId(PyObject *self, PyObject *args, PyO
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -5583,7 +5629,7 @@ static PyObject *_wrap_wxPyShape_NameRegions(PyObject *self, PyObject *args, PyO
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -5763,7 +5809,7 @@ static PyObject *_wrap_wxPyShape_FindRegion(PyObject *self, PyObject *args, PyOb
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -8406,6 +8452,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxPyProcess","_class_wxPyProcess",0},
|
||||
{ "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0},
|
||||
{ "_wxImageHandler","_class_wxImageHandler",0},
|
||||
{ "_wxMutexGuiLocker","_class_wxMutexGuiLocker",0},
|
||||
{ "_wxLog","_class_wxLog",0},
|
||||
{ "_class_wxToolBarBase","_wxToolBarBase",0},
|
||||
{ "_wxMask","_class_wxMask",0},
|
||||
@@ -8421,6 +8468,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObject","_class_wxDataObject",0},
|
||||
{ "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
|
||||
{ "_wxStaticBox","_class_wxStaticBox",0},
|
||||
{ "_wxColourDatabase","_class_wxColourDatabase",0},
|
||||
{ "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
|
||||
{ "_wxPyDropSource","_class_wxPyDropSource",0},
|
||||
{ "_wxChoice","_class_wxChoice",0},
|
||||
@@ -8502,6 +8550,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxStaticLine","_class_wxStaticLine",0},
|
||||
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
|
||||
{ "_wxBrush","_class_wxBrush",0},
|
||||
{ "_wxToggleButton","_class_wxToggleButton",0},
|
||||
{ "_wxMiniFrame","_class_wxMiniFrame",0},
|
||||
{ "_class_wxNotebookEvent","_wxNotebookEvent",0},
|
||||
{ "_class_wxPyPrintout","_wxPyPrintout",0},
|
||||
@@ -8538,6 +8587,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxZipFSHandler","_wxZipFSHandler",0},
|
||||
{ "_char","_wxChar",0},
|
||||
{ "_wxBitmap","_class_wxBitmap",0},
|
||||
{ "_wxPenList","_class_wxPenList",0},
|
||||
{ "_wxPrintDialog","_class_wxPrintDialog",0},
|
||||
{ "_wxWindowDC","_class_wxWindowDC",0},
|
||||
{ "_wxTimerEvent","_class_wxTimerEvent",0},
|
||||
@@ -8552,6 +8602,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxMessageDialog","_class_wxMessageDialog",0},
|
||||
{ "_class_wxValidator","_wxValidator",0},
|
||||
{ "_class_wxPyEvent","_wxPyEvent",0},
|
||||
{ "_class_wxMutexGuiLocker","_wxMutexGuiLocker",0},
|
||||
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
|
||||
{ "_wxConfig","_class_wxConfig",0},
|
||||
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
|
||||
@@ -8564,6 +8615,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxToolBar","_wxToolBar",0},
|
||||
{ "_wxDropTarget","_class_wxDropTarget",0},
|
||||
{ "_class_wxStaticLine","_wxStaticLine",0},
|
||||
{ "_class_wxColourDatabase","_wxColourDatabase",0},
|
||||
{ "_wxScrollEvent","_class_wxScrollEvent",0},
|
||||
{ "_wxToolBarToolBase","_class_wxToolBarToolBase",0},
|
||||
{ "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0},
|
||||
@@ -8593,9 +8645,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
|
||||
{ "_wxGenericDragImage","_class_wxGenericDragImage",0},
|
||||
{ "_class_wxProgressDialog","_wxProgressDialog",0},
|
||||
{ "_class_wxBrushList","_wxBrushList",0},
|
||||
{ "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
|
||||
{ "_wxPyInputStream","_class_wxPyInputStream",0},
|
||||
{ "_wxPyApp","_class_wxPyApp",0},
|
||||
{ "_class_wxPenList","_wxPenList",0},
|
||||
{ "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
|
||||
{ "_class_wxOutputStream","_wxOutputStream",0},
|
||||
{ "_wxLogTextCtrl","_class_wxLogTextCtrl",0},
|
||||
@@ -8654,9 +8708,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxCloseEvent","_wxCloseEvent",0},
|
||||
{ "_wxSashEvent","_class_wxSashEvent",0},
|
||||
{ "_wxBusyInfo","_class_wxBusyInfo",0},
|
||||
{ "_wxFontList","_class_wxFontList",0},
|
||||
{ "_class_wxMenuEvent","_wxMenuEvent",0},
|
||||
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
|
||||
{ "_wxJoystick","_class_wxJoystick",0},
|
||||
{ "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
|
||||
{ "_wxClientDC","_class_wxClientDC",0},
|
||||
{ "_wxMouseEvent","_class_wxMouseEvent",0},
|
||||
@@ -8817,6 +8871,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
|
||||
{ "_class_wxJoystickEvent","_wxJoystickEvent",0},
|
||||
{ "_class_wxTipProvider","_wxTipProvider",0},
|
||||
{ "_class_wxToggleButton","_wxToggleButton",0},
|
||||
{ "_class_wxMiniFrame","_wxMiniFrame",0},
|
||||
{ "_wxFontDialog","_class_wxFontDialog",0},
|
||||
{ "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0},
|
||||
@@ -8835,11 +8890,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxGauge","_class_wxGauge",0},
|
||||
{ "_class_wxCheckListBox","_wxCheckListBox",0},
|
||||
{ "_class_wxBusyInfo","_wxBusyInfo",0},
|
||||
{ "_class_wxJoystick","_wxJoystick",0},
|
||||
{ "_class_wxFontList","_wxFontList",0},
|
||||
{ "_class_wxCommandEvent","_wxCommandEvent",0},
|
||||
{ "_class_wxClientDC","_wxClientDC",0},
|
||||
{ "_class_wxSizeEvent","_wxSizeEvent",0},
|
||||
{ "_class_wxListCtrl","_wxListCtrl",0},
|
||||
{ "_wxBrushList","_class_wxBrushList",0},
|
||||
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
|
||||
{ "_class_wxLogNull","_wxLogNull",0},
|
||||
{ "_class_wxSize","_wxSize",0},
|
||||
|
@@ -14,7 +14,7 @@
|
||||
%module oglbasic
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
%}
|
||||
|
||||
@@ -231,9 +231,11 @@ public:
|
||||
int GetAttachmentMode();
|
||||
void SetId(long i);
|
||||
long GetId();
|
||||
|
||||
void SetPen(wxPen *pen);
|
||||
void SetBrush(wxBrush *brush);
|
||||
|
||||
|
||||
// void SetClientData(wxObject *client_data);
|
||||
// wxObject *GetClientData();
|
||||
%addmethods {
|
||||
|
@@ -55,17 +55,17 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#define SWIG_name "oglcanvasc"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -82,29 +82,33 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
static char* wxStringErrorMsg = "String or Unicode type required";
|
||||
#else
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#endif
|
||||
|
||||
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnBeginDragLeft);
|
||||
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnBeginDragRight);
|
||||
@@ -613,7 +617,7 @@ static PyObject *_wrap_wxDiagram_LoadFile(PyObject *self, PyObject *args, PyObje
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -907,7 +911,7 @@ static PyObject *_wrap_wxDiagram_SaveFile(PyObject *self, PyObject *args, PyObje
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -1121,20 +1125,16 @@ static PyObject *_wrap_wxDiagram_Snap(PyObject *self, PyObject *args, PyObject *
|
||||
PyObject * _resultobj;
|
||||
wxDiagram * _arg0;
|
||||
double * _arg1;
|
||||
double temp;
|
||||
double * _arg2;
|
||||
double temp0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
double temp;
|
||||
PyObject * _obj1 = 0;
|
||||
double temp0;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","INOUT","INOUT", NULL };
|
||||
|
||||
self = self;
|
||||
{
|
||||
_arg1 = &temp;
|
||||
}
|
||||
{
|
||||
_arg2 = &temp0;
|
||||
}
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDiagram_Snap",_kwnames,&_argo0))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDiagram_Snap",_kwnames,&_argo0,&_obj1,&_obj2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -1143,6 +1143,14 @@ static PyObject *_wrap_wxDiagram_Snap(PyObject *self, PyObject *args, PyObject *
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
temp = PyFloat_AsDouble(_obj1);
|
||||
_arg1 = &temp;
|
||||
}
|
||||
{
|
||||
temp0 = PyFloat_AsDouble(_obj2);
|
||||
_arg2 = &temp0;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxDiagram_Snap(_arg0,_arg1,_arg2);
|
||||
@@ -1201,8 +1209,8 @@ static PyObject *_wrap_new_wxPyShapeCanvas(PyObject *self, PyObject *args, PyObj
|
||||
wxPyShapeCanvas * _result;
|
||||
wxWindow * _arg0 = (wxWindow *) NULL;
|
||||
wxWindowID _arg1 = (wxWindowID ) -1;
|
||||
wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition;
|
||||
wxSize * _arg3 = (wxSize *) &wxPyDefaultSize;
|
||||
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
|
||||
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
|
||||
long _arg4 = (long ) wxBORDER;
|
||||
PyObject * _argo0 = 0;
|
||||
wxPoint temp;
|
||||
@@ -1898,20 +1906,16 @@ static PyObject *_wrap_wxPyShapeCanvas_Snap(PyObject *self, PyObject *args, PyOb
|
||||
PyObject * _resultobj;
|
||||
wxPyShapeCanvas * _arg0;
|
||||
double * _arg1;
|
||||
double temp;
|
||||
double * _arg2;
|
||||
double temp0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
double temp;
|
||||
PyObject * _obj1 = 0;
|
||||
double temp0;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","INOUT","INOUT", NULL };
|
||||
|
||||
self = self;
|
||||
{
|
||||
_arg1 = &temp;
|
||||
}
|
||||
{
|
||||
_arg2 = &temp0;
|
||||
}
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShapeCanvas_Snap",_kwnames,&_argo0))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShapeCanvas_Snap",_kwnames,&_argo0,&_obj1,&_obj2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -1920,6 +1924,14 @@ static PyObject *_wrap_wxPyShapeCanvas_Snap(PyObject *self, PyObject *args, PyOb
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
temp = PyFloat_AsDouble(_obj1);
|
||||
_arg1 = &temp;
|
||||
}
|
||||
{
|
||||
temp0 = PyFloat_AsDouble(_obj2);
|
||||
_arg2 = &temp0;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxPyShapeCanvas_Snap(_arg0,_arg1,_arg2);
|
||||
@@ -2047,6 +2059,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxPyProcess","_class_wxPyProcess",0},
|
||||
{ "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0},
|
||||
{ "_wxImageHandler","_class_wxImageHandler",0},
|
||||
{ "_wxMutexGuiLocker","_class_wxMutexGuiLocker",0},
|
||||
{ "_wxLog","_class_wxLog",0},
|
||||
{ "_class_wxToolBarBase","_wxToolBarBase",0},
|
||||
{ "_wxMask","_class_wxMask",0},
|
||||
@@ -2062,6 +2075,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObject","_class_wxDataObject",0},
|
||||
{ "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
|
||||
{ "_wxStaticBox","_class_wxStaticBox",0},
|
||||
{ "_wxColourDatabase","_class_wxColourDatabase",0},
|
||||
{ "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
|
||||
{ "_wxPyDropSource","_class_wxPyDropSource",0},
|
||||
{ "_wxChoice","_class_wxChoice",0},
|
||||
@@ -2143,6 +2157,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxStaticLine","_class_wxStaticLine",0},
|
||||
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
|
||||
{ "_wxBrush","_class_wxBrush",0},
|
||||
{ "_wxToggleButton","_class_wxToggleButton",0},
|
||||
{ "_wxMiniFrame","_class_wxMiniFrame",0},
|
||||
{ "_class_wxNotebookEvent","_wxNotebookEvent",0},
|
||||
{ "_class_wxPyPrintout","_wxPyPrintout",0},
|
||||
@@ -2180,6 +2195,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxZipFSHandler","_wxZipFSHandler",0},
|
||||
{ "_char","_wxChar",0},
|
||||
{ "_wxBitmap","_class_wxBitmap",0},
|
||||
{ "_wxPenList","_class_wxPenList",0},
|
||||
{ "_wxPrintDialog","_class_wxPrintDialog",0},
|
||||
{ "_wxWindowDC","_class_wxWindowDC",0},
|
||||
{ "_wxTimerEvent","_class_wxTimerEvent",0},
|
||||
@@ -2194,6 +2210,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxMessageDialog","_class_wxMessageDialog",0},
|
||||
{ "_class_wxValidator","_wxValidator",0},
|
||||
{ "_class_wxPyEvent","_wxPyEvent",0},
|
||||
{ "_class_wxMutexGuiLocker","_wxMutexGuiLocker",0},
|
||||
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
|
||||
{ "_wxConfig","_class_wxConfig",0},
|
||||
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
|
||||
@@ -2206,6 +2223,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxToolBar","_wxToolBar",0},
|
||||
{ "_wxDropTarget","_class_wxDropTarget",0},
|
||||
{ "_class_wxStaticLine","_wxStaticLine",0},
|
||||
{ "_class_wxColourDatabase","_wxColourDatabase",0},
|
||||
{ "_wxScrollEvent","_class_wxScrollEvent",0},
|
||||
{ "_wxToolBarToolBase","_class_wxToolBarToolBase",0},
|
||||
{ "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0},
|
||||
@@ -2236,9 +2254,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxPyShapeCanvas","_wxPyShapeCanvas",0},
|
||||
{ "_wxGenericDragImage","_class_wxGenericDragImage",0},
|
||||
{ "_class_wxProgressDialog","_wxProgressDialog",0},
|
||||
{ "_class_wxBrushList","_wxBrushList",0},
|
||||
{ "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
|
||||
{ "_wxPyInputStream","_class_wxPyInputStream",0},
|
||||
{ "_wxPyApp","_class_wxPyApp",0},
|
||||
{ "_class_wxPenList","_wxPenList",0},
|
||||
{ "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
|
||||
{ "_class_wxOutputStream","_wxOutputStream",0},
|
||||
{ "_wxLogTextCtrl","_class_wxLogTextCtrl",0},
|
||||
@@ -2301,9 +2321,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxCloseEvent","_wxCloseEvent",0},
|
||||
{ "_wxSashEvent","_class_wxSashEvent",0},
|
||||
{ "_wxBusyInfo","_class_wxBusyInfo",0},
|
||||
{ "_wxFontList","_class_wxFontList",0},
|
||||
{ "_class_wxMenuEvent","_wxMenuEvent",0},
|
||||
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
|
||||
{ "_wxJoystick","_class_wxJoystick",0},
|
||||
{ "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
|
||||
{ "_wxClientDC","_class_wxClientDC",0},
|
||||
{ "_wxMouseEvent","_class_wxMouseEvent",0},
|
||||
@@ -2466,6 +2486,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
|
||||
{ "_class_wxJoystickEvent","_wxJoystickEvent",0},
|
||||
{ "_class_wxTipProvider","_wxTipProvider",0},
|
||||
{ "_class_wxToggleButton","_wxToggleButton",0},
|
||||
{ "_class_wxMiniFrame","_wxMiniFrame",0},
|
||||
{ "_wxFontDialog","_class_wxFontDialog",0},
|
||||
{ "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0},
|
||||
@@ -2485,11 +2506,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxGauge","_class_wxGauge",0},
|
||||
{ "_class_wxCheckListBox","_wxCheckListBox",0},
|
||||
{ "_class_wxBusyInfo","_wxBusyInfo",0},
|
||||
{ "_class_wxJoystick","_wxJoystick",0},
|
||||
{ "_class_wxFontList","_wxFontList",0},
|
||||
{ "_class_wxCommandEvent","_wxCommandEvent",0},
|
||||
{ "_class_wxClientDC","_wxClientDC",0},
|
||||
{ "_class_wxSizeEvent","_wxSizeEvent",0},
|
||||
{ "_class_wxListCtrl","_wxListCtrl",0},
|
||||
{ "_wxBrushList","_class_wxBrushList",0},
|
||||
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
|
||||
{ "_class_wxLogNull","_wxLogNull",0},
|
||||
{ "_class_wxSize","_wxSize",0},
|
||||
|
@@ -14,7 +14,7 @@
|
||||
%module oglcanvas
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
%}
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
void SetQuickEditMode(bool mode);
|
||||
void SetSnapToGrid(bool snap);
|
||||
void ShowAll(bool show);
|
||||
void Snap(double *OUTPUT, double *OUTPUT);
|
||||
void Snap(double *INOUT, double *INOUT);
|
||||
|
||||
};
|
||||
|
||||
@@ -112,8 +112,8 @@ public:
|
||||
class wxPyShapeCanvas : public wxScrolledWindow {
|
||||
public:
|
||||
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxPyDefaultPosition,
|
||||
const wxSize& size = wxPyDefaultSize,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxBORDER);
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
void Redraw(wxDC& dc);
|
||||
void RemoveShape(wxPyShape *shape);
|
||||
void SetDiagram(wxDiagram *diagram);
|
||||
void Snap(double *OUTPUT, double *OUTPUT);
|
||||
void Snap(double *INOUT, double *INOUT);
|
||||
|
||||
};
|
||||
|
||||
|
@@ -1,103 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: oglhelpers.cpp
|
||||
// Purpose: Some Helper functions to help in data conversions in OGL
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 3-Sept-1999
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <Python.h>
|
||||
#include "helpers.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// This one will work for any class for the VERY generic cases, but beyond that
|
||||
// the helper needs to know more about the type.
|
||||
|
||||
wxList* wxPy_wxListHelper(PyObject* pyList, char* className) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* pyo = PyList_GetItem(pyList, x);
|
||||
wxObject* wxo = NULL;
|
||||
|
||||
if (SWIG_GetPtrObj(pyo, (void **)&wxo, className)) {
|
||||
char errmsg[1024];
|
||||
sprintf(errmsg, "Type error, expected list of %s objects", className);
|
||||
PyErr_SetString(PyExc_TypeError, errmsg);
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append(wxo);
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* pyo = PyList_GetItem(pyList, x);
|
||||
|
||||
if (PyTuple_Check(pyo)) {
|
||||
PyObject* o1 = PyNumber_Float(PyTuple_GetItem(pyo, 0));
|
||||
PyObject* o2 = PyNumber_Float(PyTuple_GetItem(pyo, 1));
|
||||
|
||||
double val1 = (o1 ? PyFloat_AsDouble(o1) : 0.0);
|
||||
double val2 = (o2 ? PyFloat_AsDouble(o2) : 0.0);
|
||||
|
||||
list->Append((wxObject*) new wxRealPoint(val1, val2));
|
||||
|
||||
} else {
|
||||
wxRealPoint* wxo = NULL;
|
||||
if (SWIG_GetPtrObj(pyo, (void **)&wxo, "_wxRealPoint_p")) {
|
||||
PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append((wxObject*) new wxRealPoint(*wxo));
|
||||
}
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -110,8 +110,8 @@ wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList);
|
||||
class wxPyShapeCanvas : public wxShapeCanvas {
|
||||
public:
|
||||
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxPyDefaultPosition,
|
||||
const wxSize& size = wxPyDefaultSize,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxBORDER)
|
||||
: wxShapeCanvas(parent, id, pos, size, style) {}
|
||||
|
||||
|
@@ -55,17 +55,17 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#define SWIG_name "oglshapesc"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -82,29 +82,33 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
static char* wxStringErrorMsg = "String or Unicode type required";
|
||||
#else
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#endif
|
||||
|
||||
WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape);
|
||||
|
||||
@@ -703,11 +707,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetFillBrush(PyObject *self, PyObject *a
|
||||
wxPseudoMetaFile * _arg0;
|
||||
wxBrush * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","brush", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetFillBrush",_kwnames,&_argo0,&_argo1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetFillBrush",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -716,13 +720,20 @@ static PyObject *_wrap_wxPseudoMetaFile_SetFillBrush(PyObject *self, PyObject *a
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetFillBrush. Expected _wxBrush_p.");
|
||||
{
|
||||
wxBrush* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxBrush_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxPseudoMetaFile_SetFillBrush(_arg0,_arg1);
|
||||
@@ -773,11 +784,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetOutlinePen(PyObject *self, PyObject *
|
||||
wxPseudoMetaFile * _arg0;
|
||||
wxPen * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","pen", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetOutlinePen",_kwnames,&_argo0,&_argo1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetOutlinePen",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -786,13 +797,22 @@ static PyObject *_wrap_wxPseudoMetaFile_SetOutlinePen(PyObject *self, PyObject *
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetOutlinePen. Expected _wxPen_p.");
|
||||
{
|
||||
wxPen* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
|
||||
temp->GetWidth(),
|
||||
temp->GetStyle());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxPseudoMetaFile_SetOutlinePen(_arg0,_arg1);
|
||||
@@ -1217,7 +1237,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawText(PyObject *self, PyObject *args,
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -1257,6 +1277,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawLines(PyObject *self, PyObject *args
|
||||
int _arg1;
|
||||
wxPoint * _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
int NPOINTS;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","points", NULL };
|
||||
|
||||
@@ -1272,18 +1293,13 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawLines(PyObject *self, PyObject *args
|
||||
}
|
||||
if (_obj2)
|
||||
{
|
||||
_arg2 = wxPoint_LIST_helper(_obj2);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
_arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (_obj2) {
|
||||
_arg1 = PyList_Size(_obj2);
|
||||
}
|
||||
else {
|
||||
_arg1 = 0;
|
||||
}
|
||||
_arg1 = NPOINTS;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -1306,6 +1322,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawPolygon(PyObject *self, PyObject *ar
|
||||
wxPoint * _arg2;
|
||||
int _arg3 = (int ) 0;
|
||||
PyObject * _argo0 = 0;
|
||||
int NPOINTS;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","points","flags", NULL };
|
||||
|
||||
@@ -1321,18 +1338,13 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawPolygon(PyObject *self, PyObject *ar
|
||||
}
|
||||
if (_obj2)
|
||||
{
|
||||
_arg2 = wxPoint_LIST_helper(_obj2);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
_arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (_obj2) {
|
||||
_arg1 = PyList_Size(_obj2);
|
||||
}
|
||||
else {
|
||||
_arg1 = 0;
|
||||
}
|
||||
_arg1 = NPOINTS;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -1354,6 +1366,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawSpline(PyObject *self, PyObject *arg
|
||||
int _arg1;
|
||||
wxPoint * _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
int NPOINTS;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","points", NULL };
|
||||
|
||||
@@ -1369,18 +1382,13 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawSpline(PyObject *self, PyObject *arg
|
||||
}
|
||||
if (_obj2)
|
||||
{
|
||||
_arg2 = wxPoint_LIST_helper(_obj2);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
_arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (_obj2) {
|
||||
_arg1 = PyList_Size(_obj2);
|
||||
}
|
||||
else {
|
||||
_arg1 = 0;
|
||||
}
|
||||
_arg1 = NPOINTS;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -1464,12 +1472,12 @@ static PyObject *_wrap_wxPseudoMetaFile_SetPen(PyObject *self, PyObject *args, P
|
||||
wxPen * _arg1;
|
||||
bool _arg2 = (bool ) FALSE;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
int tempbool2 = (int) FALSE;
|
||||
char *_kwnames[] = { "self","pen","isOutline", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPseudoMetaFile_SetPen",_kwnames,&_argo0,&_argo1,&tempbool2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPseudoMetaFile_SetPen",_kwnames,&_argo0,&_obj1,&tempbool2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -1478,13 +1486,22 @@ static PyObject *_wrap_wxPseudoMetaFile_SetPen(PyObject *self, PyObject *args, P
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetPen. Expected _wxPen_p.");
|
||||
{
|
||||
wxPen* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
|
||||
temp->GetWidth(),
|
||||
temp->GetStyle());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -1503,12 +1520,12 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBrush(PyObject *self, PyObject *args,
|
||||
wxBrush * _arg1;
|
||||
bool _arg2 = (bool ) FALSE;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
int tempbool2 = (int) FALSE;
|
||||
char *_kwnames[] = { "self","brush","isFill", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPseudoMetaFile_SetBrush",_kwnames,&_argo0,&_argo1,&tempbool2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPseudoMetaFile_SetBrush",_kwnames,&_argo0,&_obj1,&tempbool2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -1517,13 +1534,20 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBrush(PyObject *self, PyObject *args,
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetBrush. Expected _wxBrush_p.");
|
||||
{
|
||||
wxBrush* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxBrush_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -1541,11 +1565,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetFont(PyObject *self, PyObject *args,
|
||||
wxPseudoMetaFile * _arg0;
|
||||
wxFont * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","font", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetFont",_kwnames,&_argo0,&_argo1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetFont",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -1554,13 +1578,26 @@ static PyObject *_wrap_wxPseudoMetaFile_SetFont(PyObject *self, PyObject *args,
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetFont. Expected _wxFont_p.");
|
||||
{
|
||||
wxFont* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxFont_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
|
||||
temp->GetFamily(),
|
||||
temp->GetStyle(),
|
||||
temp->GetWeight(),
|
||||
temp->GetUnderlined(),
|
||||
temp->GetFaceName(),
|
||||
temp->GetEncoding());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxPseudoMetaFile_SetFont(_arg0,_arg1);
|
||||
@@ -4153,7 +4190,7 @@ static PyObject *_wrap_wxPyBitmapShape_SetFilename(PyObject *self, PyObject *arg
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -5501,6 +5538,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawLines(PyObject *self, PyObject *args,
|
||||
int _arg1;
|
||||
wxPoint * _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
int NPOINTS;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","points", NULL };
|
||||
|
||||
@@ -5516,18 +5554,13 @@ static PyObject *_wrap_wxPyDrawnShape_DrawLines(PyObject *self, PyObject *args,
|
||||
}
|
||||
if (_obj2)
|
||||
{
|
||||
_arg2 = wxPoint_LIST_helper(_obj2);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
_arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (_obj2) {
|
||||
_arg1 = PyList_Size(_obj2);
|
||||
}
|
||||
else {
|
||||
_arg1 = 0;
|
||||
}
|
||||
_arg1 = NPOINTS;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -5585,6 +5618,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawPolygon(PyObject *self, PyObject *args
|
||||
wxPoint * _arg2;
|
||||
int _arg3 = (int ) 0;
|
||||
PyObject * _argo0 = 0;
|
||||
int NPOINTS;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","points","flags", NULL };
|
||||
|
||||
@@ -5600,18 +5634,13 @@ static PyObject *_wrap_wxPyDrawnShape_DrawPolygon(PyObject *self, PyObject *args
|
||||
}
|
||||
if (_obj2)
|
||||
{
|
||||
_arg2 = wxPoint_LIST_helper(_obj2);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
_arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (_obj2) {
|
||||
_arg1 = PyList_Size(_obj2);
|
||||
}
|
||||
else {
|
||||
_arg1 = 0;
|
||||
}
|
||||
_arg1 = NPOINTS;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -5704,6 +5733,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawSpline(PyObject *self, PyObject *args,
|
||||
int _arg1;
|
||||
wxPoint * _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
int NPOINTS;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","points", NULL };
|
||||
|
||||
@@ -5719,18 +5749,13 @@ static PyObject *_wrap_wxPyDrawnShape_DrawSpline(PyObject *self, PyObject *args,
|
||||
}
|
||||
if (_obj2)
|
||||
{
|
||||
_arg2 = wxPoint_LIST_helper(_obj2);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
_arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
|
||||
if (_arg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (_obj2) {
|
||||
_arg1 = PyList_Size(_obj2);
|
||||
}
|
||||
else {
|
||||
_arg1 = 0;
|
||||
}
|
||||
_arg1 = NPOINTS;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -5771,7 +5796,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawText(PyObject *self, PyObject *args, P
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -6056,12 +6081,12 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBrush(PyObject *self, PyObject *ar
|
||||
wxBrush * _arg1;
|
||||
bool _arg2 = (bool ) FALSE;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
int tempbool2 = (int) FALSE;
|
||||
char *_kwnames[] = { "self","pen","isOutline", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyDrawnShape_SetDrawnBrush",_kwnames,&_argo0,&_argo1,&tempbool2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyDrawnShape_SetDrawnBrush",_kwnames,&_argo0,&_obj1,&tempbool2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -6070,13 +6095,20 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBrush(PyObject *self, PyObject *ar
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDrawnShape_SetDrawnBrush. Expected _wxBrush_p.");
|
||||
{
|
||||
wxBrush* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxBrush_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -6094,11 +6126,11 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnFont(PyObject *self, PyObject *arg
|
||||
wxPyDrawnShape * _arg0;
|
||||
wxFont * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","font", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDrawnShape_SetDrawnFont",_kwnames,&_argo0,&_argo1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDrawnShape_SetDrawnFont",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -6107,13 +6139,26 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnFont(PyObject *self, PyObject *arg
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDrawnShape_SetDrawnFont. Expected _wxFont_p.");
|
||||
{
|
||||
wxFont* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxFont_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
|
||||
temp->GetFamily(),
|
||||
temp->GetStyle(),
|
||||
temp->GetWeight(),
|
||||
temp->GetUnderlined(),
|
||||
temp->GetFaceName(),
|
||||
temp->GetEncoding());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxPyDrawnShape_SetDrawnFont(_arg0,_arg1);
|
||||
@@ -6131,12 +6176,12 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnPen(PyObject *self, PyObject *args
|
||||
wxPen * _arg1;
|
||||
bool _arg2 = (bool ) FALSE;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
int tempbool2 = (int) FALSE;
|
||||
char *_kwnames[] = { "self","pen","isOutline", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyDrawnShape_SetDrawnPen",_kwnames,&_argo0,&_argo1,&tempbool2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyDrawnShape_SetDrawnPen",_kwnames,&_argo0,&_obj1,&tempbool2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -6145,13 +6190,22 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnPen(PyObject *self, PyObject *args
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDrawnShape_SetDrawnPen. Expected _wxPen_p.");
|
||||
{
|
||||
wxPen* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
|
||||
temp->GetWidth(),
|
||||
temp->GetStyle());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -7346,33 +7400,6 @@ static PyObject *_wrap_new_wxOGLConstraint(PyObject *self, PyObject *args, PyObj
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define delete_wxOGLConstraint(_swigobj) (delete _swigobj)
|
||||
static PyObject *_wrap_delete_wxOGLConstraint(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxOGLConstraint * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxOGLConstraint",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxOGLConstraint_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxOGLConstraint. Expected _wxOGLConstraint_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
delete_wxOGLConstraint(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxOGLConstraint_Evaluate(_swigobj) (_swigobj->Evaluate())
|
||||
static PyObject *_wrap_wxOGLConstraint_Evaluate(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -10953,7 +10980,7 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSideColour(PyObject *self, PyObj
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -10987,11 +11014,11 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSidePen(PyObject *self, PyObject
|
||||
wxPyDivisionShape * _arg0;
|
||||
wxPen * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","pen", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDivisionShape_SetLeftSidePen",_kwnames,&_argo0,&_argo1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDivisionShape_SetLeftSidePen",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -11000,13 +11027,22 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSidePen(PyObject *self, PyObject
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDivisionShape_SetLeftSidePen. Expected _wxPen_p.");
|
||||
{
|
||||
wxPen* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
|
||||
temp->GetWidth(),
|
||||
temp->GetStyle());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxPyDivisionShape_SetLeftSidePen(_arg0,_arg1);
|
||||
@@ -11112,7 +11148,7 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSideColour(PyObject *self, PyObje
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -11146,11 +11182,11 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSidePen(PyObject *self, PyObject
|
||||
wxPyDivisionShape * _arg0;
|
||||
wxPen * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","pen", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDivisionShape_SetTopSidePen",_kwnames,&_argo0,&_argo1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDivisionShape_SetTopSidePen",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -11159,13 +11195,22 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSidePen(PyObject *self, PyObject
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDivisionShape_SetTopSidePen. Expected _wxPen_p.");
|
||||
{
|
||||
wxPen* temp;
|
||||
if (_obj1) {
|
||||
if (_obj1 == Py_None) { temp = NULL; }
|
||||
else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (temp)
|
||||
_arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
|
||||
temp->GetWidth(),
|
||||
temp->GetStyle());
|
||||
else
|
||||
_arg1 = NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxPyDivisionShape_SetTopSidePen(_arg0,_arg1);
|
||||
@@ -12328,7 +12373,6 @@ static PyMethodDef oglshapescMethods[] = {
|
||||
{ "wxOGLConstraint_Equals", (PyCFunction) _wrap_wxOGLConstraint_Equals, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxOGLConstraint_SetSpacing", (PyCFunction) _wrap_wxOGLConstraint_SetSpacing, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxOGLConstraint_Evaluate", (PyCFunction) _wrap_wxOGLConstraint_Evaluate, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "delete_wxOGLConstraint", (PyCFunction) _wrap_delete_wxOGLConstraint, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxOGLConstraint", (PyCFunction) _wrap_new_wxOGLConstraint, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyDrawnShape_base_OnEndSize", (PyCFunction) _wrap_wxPyDrawnShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyDrawnShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyDrawnShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -12600,6 +12644,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxPyRectangleShape","_class_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape},
|
||||
{ "_class_wxPyRectangleShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape},
|
||||
{ "_class_wxPyRectangleShape","_wxPyRectangleShape",0},
|
||||
{ "_wxMutexGuiLocker","_class_wxMutexGuiLocker",0},
|
||||
{ "_wxLog","_class_wxLog",0},
|
||||
{ "_class_wxToolBarBase","_wxToolBarBase",0},
|
||||
{ "_wxMask","_class_wxMask",0},
|
||||
@@ -12617,6 +12662,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObject","_class_wxDataObject",0},
|
||||
{ "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
|
||||
{ "_wxStaticBox","_class_wxStaticBox",0},
|
||||
{ "_wxColourDatabase","_class_wxColourDatabase",0},
|
||||
{ "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
|
||||
{ "_wxPyDropSource","_class_wxPyDropSource",0},
|
||||
{ "_wxChoice","_class_wxChoice",0},
|
||||
@@ -12714,6 +12760,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxStaticLine","_class_wxStaticLine",0},
|
||||
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
|
||||
{ "_wxBrush","_class_wxBrush",0},
|
||||
{ "_wxToggleButton","_class_wxToggleButton",0},
|
||||
{ "_wxMiniFrame","_class_wxMiniFrame",0},
|
||||
{ "_class_wxNotebookEvent","_wxNotebookEvent",0},
|
||||
{ "_class_wxPyPrintout","_wxPyPrintout",0},
|
||||
@@ -12752,6 +12799,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxZipFSHandler","_wxZipFSHandler",0},
|
||||
{ "_char","_wxChar",0},
|
||||
{ "_wxBitmap","_class_wxBitmap",0},
|
||||
{ "_wxPenList","_class_wxPenList",0},
|
||||
{ "_wxPrintDialog","_class_wxPrintDialog",0},
|
||||
{ "_wxPyControlPoint","_class_wxPyControlPoint",0},
|
||||
{ "_wxWindowDC","_class_wxWindowDC",0},
|
||||
@@ -12767,6 +12815,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxMessageDialog","_class_wxMessageDialog",0},
|
||||
{ "_class_wxValidator","_wxValidator",0},
|
||||
{ "_class_wxPyEvent","_wxPyEvent",0},
|
||||
{ "_class_wxMutexGuiLocker","_wxMutexGuiLocker",0},
|
||||
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
|
||||
{ "_wxConfig","_class_wxConfig",0},
|
||||
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
|
||||
@@ -12781,6 +12830,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxToolBar","_wxToolBar",0},
|
||||
{ "_wxDropTarget","_class_wxDropTarget",0},
|
||||
{ "_class_wxStaticLine","_wxStaticLine",0},
|
||||
{ "_class_wxColourDatabase","_wxColourDatabase",0},
|
||||
{ "_wxScrollEvent","_class_wxScrollEvent",0},
|
||||
{ "_wxToolBarToolBase","_class_wxToolBarToolBase",0},
|
||||
{ "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0},
|
||||
@@ -12810,9 +12860,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
|
||||
{ "_wxGenericDragImage","_class_wxGenericDragImage",0},
|
||||
{ "_class_wxProgressDialog","_wxProgressDialog",0},
|
||||
{ "_class_wxBrushList","_wxBrushList",0},
|
||||
{ "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
|
||||
{ "_wxPyInputStream","_class_wxPyInputStream",0},
|
||||
{ "_wxPyApp","_class_wxPyApp",0},
|
||||
{ "_class_wxPenList","_wxPenList",0},
|
||||
{ "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
|
||||
{ "_class_wxOutputStream","_wxOutputStream",0},
|
||||
{ "_wxLogTextCtrl","_class_wxLogTextCtrl",0},
|
||||
@@ -12871,9 +12923,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxCloseEvent","_wxCloseEvent",0},
|
||||
{ "_wxSashEvent","_class_wxSashEvent",0},
|
||||
{ "_wxBusyInfo","_class_wxBusyInfo",0},
|
||||
{ "_wxFontList","_class_wxFontList",0},
|
||||
{ "_class_wxMenuEvent","_wxMenuEvent",0},
|
||||
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
|
||||
{ "_wxJoystick","_class_wxJoystick",0},
|
||||
{ "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
|
||||
{ "_wxClientDC","_class_wxClientDC",0},
|
||||
{ "_wxMouseEvent","_class_wxMouseEvent",0},
|
||||
@@ -13066,6 +13118,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
|
||||
{ "_class_wxJoystickEvent","_wxJoystickEvent",0},
|
||||
{ "_class_wxTipProvider","_wxTipProvider",0},
|
||||
{ "_class_wxToggleButton","_wxToggleButton",0},
|
||||
{ "_class_wxMiniFrame","_wxMiniFrame",0},
|
||||
{ "_wxFontDialog","_class_wxFontDialog",0},
|
||||
{ "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0},
|
||||
@@ -13084,12 +13137,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxGauge","_class_wxGauge",0},
|
||||
{ "_class_wxCheckListBox","_wxCheckListBox",0},
|
||||
{ "_class_wxBusyInfo","_wxBusyInfo",0},
|
||||
{ "_class_wxJoystick","_wxJoystick",0},
|
||||
{ "_class_wxFontList","_wxFontList",0},
|
||||
{ "_class_wxCommandEvent","_wxCommandEvent",0},
|
||||
{ "_class_wxClientDC","_wxClientDC",0},
|
||||
{ "_class_wxSizeEvent","_wxSizeEvent",0},
|
||||
{ "_class_wxListCtrl","_wxListCtrl",0},
|
||||
{ "_class_wxPyDividedShape","_wxPyDividedShape",0},
|
||||
{ "_wxBrushList","_class_wxBrushList",0},
|
||||
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
|
||||
{ "_class_wxLogNull","_wxLogNull",0},
|
||||
{ "_class_wxSize","_wxSize",0},
|
||||
|
@@ -14,7 +14,7 @@
|
||||
%module oglshapes
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
%}
|
||||
|
||||
@@ -337,7 +337,8 @@ public:
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
~wxOGLConstraint();
|
||||
|
||||
//~wxOGLConstraint(); The wxCompositShape takes ownership of the constraint
|
||||
|
||||
bool Evaluate();
|
||||
void SetSpacing(double x, double y);
|
||||
|
@@ -713,9 +713,6 @@ class wxOGLConstraintPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,oglshapesc=oglshapesc):
|
||||
if self.thisown == 1 :
|
||||
oglshapesc.delete_wxOGLConstraint(self)
|
||||
def Evaluate(self, *_args, **_kwargs):
|
||||
val = apply(oglshapesc.wxOGLConstraint_Evaluate,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
@@ -55,17 +55,17 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#define SWIG_name "oglshapes2c"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -82,29 +82,33 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
static char* wxStringErrorMsg = "String or Unicode type required";
|
||||
#else
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#endif
|
||||
|
||||
WXSHAPE_IMP_CALLBACKS(wxPyEllipseShape, wxEllipseShape);
|
||||
|
||||
@@ -2965,7 +2969,7 @@ static PyObject *_wrap_wxPyLineShape_ClearArrow(PyObject *self, PyObject *args,
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -3122,7 +3126,7 @@ static PyObject *_wrap_wxPyLineShape_DeleteArrowHead(PyObject *self, PyObject *a
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -3367,7 +3371,7 @@ static PyObject *_wrap_wxPyLineShape_FindArrowHead(PyObject *self, PyObject *arg
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -7937,6 +7941,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxPyRectangleShape","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyRectangleShape},
|
||||
{ "_class_wxPyRectangleShape","_wxPyTextShape",SwigwxPyTextShapeTowxPyRectangleShape},
|
||||
{ "_class_wxPyRectangleShape","_wxPyRectangleShape",0},
|
||||
{ "_wxMutexGuiLocker","_class_wxMutexGuiLocker",0},
|
||||
{ "_wxLog","_class_wxLog",0},
|
||||
{ "_class_wxToolBarBase","_wxToolBarBase",0},
|
||||
{ "_wxMask","_class_wxMask",0},
|
||||
@@ -7955,6 +7960,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObject","_class_wxDataObject",0},
|
||||
{ "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
|
||||
{ "_wxStaticBox","_class_wxStaticBox",0},
|
||||
{ "_wxColourDatabase","_class_wxColourDatabase",0},
|
||||
{ "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
|
||||
{ "_wxPyDropSource","_class_wxPyDropSource",0},
|
||||
{ "_wxChoice","_class_wxChoice",0},
|
||||
@@ -8050,6 +8056,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxStaticLine","_class_wxStaticLine",0},
|
||||
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
|
||||
{ "_wxBrush","_class_wxBrush",0},
|
||||
{ "_wxToggleButton","_class_wxToggleButton",0},
|
||||
{ "_wxMiniFrame","_class_wxMiniFrame",0},
|
||||
{ "_class_wxNotebookEvent","_wxNotebookEvent",0},
|
||||
{ "_class_wxPyPrintout","_wxPyPrintout",0},
|
||||
@@ -8088,6 +8095,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxZipFSHandler","_wxZipFSHandler",0},
|
||||
{ "_char","_wxChar",0},
|
||||
{ "_wxBitmap","_class_wxBitmap",0},
|
||||
{ "_wxPenList","_class_wxPenList",0},
|
||||
{ "_wxPrintDialog","_class_wxPrintDialog",0},
|
||||
{ "_wxPyControlPoint","_class_wxPyControlPoint",0},
|
||||
{ "_wxWindowDC","_class_wxWindowDC",0},
|
||||
@@ -8103,6 +8111,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxMessageDialog","_class_wxMessageDialog",0},
|
||||
{ "_class_wxValidator","_wxValidator",0},
|
||||
{ "_class_wxPyEvent","_wxPyEvent",0},
|
||||
{ "_class_wxMutexGuiLocker","_wxMutexGuiLocker",0},
|
||||
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
|
||||
{ "_wxConfig","_class_wxConfig",0},
|
||||
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
|
||||
@@ -8117,6 +8126,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxToolBar","_wxToolBar",0},
|
||||
{ "_wxDropTarget","_class_wxDropTarget",0},
|
||||
{ "_class_wxStaticLine","_wxStaticLine",0},
|
||||
{ "_class_wxColourDatabase","_wxColourDatabase",0},
|
||||
{ "_wxScrollEvent","_class_wxScrollEvent",0},
|
||||
{ "_wxToolBarToolBase","_class_wxToolBarToolBase",0},
|
||||
{ "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0},
|
||||
@@ -8147,9 +8157,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxPyCircleShape","_class_wxPyCircleShape",0},
|
||||
{ "_wxGenericDragImage","_class_wxGenericDragImage",0},
|
||||
{ "_class_wxProgressDialog","_wxProgressDialog",0},
|
||||
{ "_class_wxBrushList","_wxBrushList",0},
|
||||
{ "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
|
||||
{ "_wxPyInputStream","_class_wxPyInputStream",0},
|
||||
{ "_wxPyApp","_class_wxPyApp",0},
|
||||
{ "_class_wxPenList","_wxPenList",0},
|
||||
{ "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
|
||||
{ "_class_wxOutputStream","_wxOutputStream",0},
|
||||
{ "_wxLogTextCtrl","_class_wxLogTextCtrl",0},
|
||||
@@ -8211,9 +8223,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxCloseEvent","_wxCloseEvent",0},
|
||||
{ "_wxSashEvent","_class_wxSashEvent",0},
|
||||
{ "_wxBusyInfo","_class_wxBusyInfo",0},
|
||||
{ "_wxFontList","_class_wxFontList",0},
|
||||
{ "_class_wxMenuEvent","_wxMenuEvent",0},
|
||||
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
|
||||
{ "_wxJoystick","_class_wxJoystick",0},
|
||||
{ "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
|
||||
{ "_class_wxPyCircleShape","_wxPyCircleShape",0},
|
||||
{ "_wxClientDC","_class_wxClientDC",0},
|
||||
@@ -8401,6 +8413,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
|
||||
{ "_class_wxJoystickEvent","_wxJoystickEvent",0},
|
||||
{ "_class_wxTipProvider","_wxTipProvider",0},
|
||||
{ "_class_wxToggleButton","_wxToggleButton",0},
|
||||
{ "_class_wxMiniFrame","_wxMiniFrame",0},
|
||||
{ "_wxFontDialog","_class_wxFontDialog",0},
|
||||
{ "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0},
|
||||
@@ -8419,12 +8432,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxGauge","_class_wxGauge",0},
|
||||
{ "_class_wxCheckListBox","_wxCheckListBox",0},
|
||||
{ "_class_wxBusyInfo","_wxBusyInfo",0},
|
||||
{ "_class_wxJoystick","_wxJoystick",0},
|
||||
{ "_class_wxFontList","_wxFontList",0},
|
||||
{ "_class_wxCommandEvent","_wxCommandEvent",0},
|
||||
{ "_class_wxClientDC","_wxClientDC",0},
|
||||
{ "_class_wxSizeEvent","_wxSizeEvent",0},
|
||||
{ "_class_wxListCtrl","_wxListCtrl",0},
|
||||
{ "_class_wxPyDividedShape","_wxPyDividedShape",0},
|
||||
{ "_wxBrushList","_class_wxBrushList",0},
|
||||
{ "_wxPyEllipseShape","_class_wxPyCircleShape",SwigwxPyCircleShapeTowxPyEllipseShape},
|
||||
{ "_wxPyEllipseShape","_wxPyCircleShape",SwigwxPyCircleShapeTowxPyEllipseShape},
|
||||
{ "_wxPyEllipseShape","_class_wxPyEllipseShape",0},
|
||||
|
@@ -14,7 +14,7 @@
|
||||
%module oglshapes2
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
%}
|
||||
|
||||
@@ -207,6 +207,9 @@ public:
|
||||
bool IsSpline();
|
||||
void MakeLineControlPoints(int n);
|
||||
|
||||
// TODO:
|
||||
// inline wxList *GetLineControlPoints() { return m_lineControlPoints; }
|
||||
|
||||
void SetAttachmentFrom(int fromAttach);
|
||||
void SetAttachments(int fromAttach, int toAttach);
|
||||
void SetAttachmentTo(int toAttach);
|
||||
|
@@ -1,24 +0,0 @@
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
#if defined(__WIN32__)
|
||||
# if defined(_MSC_VER)
|
||||
# define SWIGEXPORT(a) __declspec(dllexport) a
|
||||
# else
|
||||
# if defined(__BORLANDC__)
|
||||
# define SWIGEXPORT(a) a _export
|
||||
# else
|
||||
# define SWIGEXPORT(a) a
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
SWIGEXPORT(void) initoglc() {
|
||||
}
|
||||
|
||||
|
@@ -55,17 +55,17 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#define SWIG_name "stc_c"
|
||||
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "wx/stc/stc.h"
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -82,29 +82,33 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
static char* wxStringErrorMsg = "String or Unicode type required";
|
||||
#else
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -210,7 +214,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AddText(PyObject *self, PyObject *args,
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -261,7 +265,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AddStyledText(PyObject *self, PyObject *
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -313,7 +317,7 @@ static PyObject *_wrap_wxStyledTextCtrl_InsertText(PyObject *self, PyObject *arg
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -2045,7 +2049,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetFaceName(PyObject *self, PyObjec
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -2497,7 +2501,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetWordChars(PyObject *self, PyObject *a
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -2865,7 +2869,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompShow(PyObject *self, PyObject *a
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -3024,7 +3028,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompStops(PyObject *self, PyObject *
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -3130,7 +3134,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSelect(PyObject *self, PyObject
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -3238,7 +3242,7 @@ static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetFillUps(PyObject *self, PyObj
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -4163,7 +4167,7 @@ static PyObject *_wrap_wxStyledTextCtrl_FindText(PyObject *self, PyObject *args,
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -4742,7 +4746,7 @@ static PyObject *_wrap_wxStyledTextCtrl_ReplaceSelection(PyObject *self, PyObjec
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -5039,7 +5043,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetText(PyObject *self, PyObject *args,
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -5207,7 +5211,7 @@ static PyObject *_wrap_wxStyledTextCtrl_CallTipShow(PyObject *self, PyObject *ar
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -6273,7 +6277,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchNext(PyObject *self, PyObject *arg
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -6325,7 +6329,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchPrev(PyObject *self, PyObject *arg
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -6816,7 +6820,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetProperty(PyObject *self, PyObject *ar
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -6834,7 +6838,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetProperty(PyObject *self, PyObject *ar
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -6890,7 +6894,7 @@ static PyObject *_wrap_wxStyledTextCtrl_SetKeyWords(PyObject *self, PyObject *ar
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -6969,7 +6973,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetSpec(PyObject *self, PyObject *a
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -7065,7 +7069,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetFontAttr(PyObject *self, PyObjec
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
|
||||
PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
|
||||
@@ -8568,6 +8572,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxPyProcess","_class_wxPyProcess",0},
|
||||
{ "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0},
|
||||
{ "_wxImageHandler","_class_wxImageHandler",0},
|
||||
{ "_wxMutexGuiLocker","_class_wxMutexGuiLocker",0},
|
||||
{ "_wxLog","_class_wxLog",0},
|
||||
{ "_class_wxToolBarBase","_wxToolBarBase",0},
|
||||
{ "_wxMask","_class_wxMask",0},
|
||||
@@ -8584,6 +8589,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObject","_class_wxDataObject",0},
|
||||
{ "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
|
||||
{ "_wxStaticBox","_class_wxStaticBox",0},
|
||||
{ "_wxColourDatabase","_class_wxColourDatabase",0},
|
||||
{ "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
|
||||
{ "_wxPyDropSource","_class_wxPyDropSource",0},
|
||||
{ "_wxChoice","_class_wxChoice",0},
|
||||
@@ -8661,6 +8667,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxStaticLine","_class_wxStaticLine",0},
|
||||
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
|
||||
{ "_wxBrush","_class_wxBrush",0},
|
||||
{ "_wxToggleButton","_class_wxToggleButton",0},
|
||||
{ "_wxMiniFrame","_class_wxMiniFrame",0},
|
||||
{ "_class_wxNotebookEvent","_wxNotebookEvent",0},
|
||||
{ "_class_wxPyPrintout","_wxPyPrintout",0},
|
||||
@@ -8701,6 +8708,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxZipFSHandler","_wxZipFSHandler",0},
|
||||
{ "_char","_wxChar",0},
|
||||
{ "_wxBitmap","_class_wxBitmap",0},
|
||||
{ "_wxPenList","_class_wxPenList",0},
|
||||
{ "_wxPrintDialog","_class_wxPrintDialog",0},
|
||||
{ "_wxWindowDC","_class_wxWindowDC",0},
|
||||
{ "_wxTimerEvent","_class_wxTimerEvent",0},
|
||||
@@ -8715,6 +8723,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxMessageDialog","_class_wxMessageDialog",0},
|
||||
{ "_class_wxValidator","_wxValidator",0},
|
||||
{ "_class_wxPyEvent","_wxPyEvent",0},
|
||||
{ "_class_wxMutexGuiLocker","_wxMutexGuiLocker",0},
|
||||
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
|
||||
{ "_wxConfig","_class_wxConfig",0},
|
||||
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
|
||||
@@ -8727,6 +8736,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxToolBar","_wxToolBar",0},
|
||||
{ "_wxDropTarget","_class_wxDropTarget",0},
|
||||
{ "_class_wxStaticLine","_wxStaticLine",0},
|
||||
{ "_class_wxColourDatabase","_wxColourDatabase",0},
|
||||
{ "_wxScrollEvent","_class_wxScrollEvent",0},
|
||||
{ "_wxToolBarToolBase","_class_wxToolBarToolBase",0},
|
||||
{ "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0},
|
||||
@@ -8755,9 +8765,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
|
||||
{ "_wxGenericDragImage","_class_wxGenericDragImage",0},
|
||||
{ "_class_wxProgressDialog","_wxProgressDialog",0},
|
||||
{ "_class_wxBrushList","_wxBrushList",0},
|
||||
{ "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
|
||||
{ "_wxPyInputStream","_class_wxPyInputStream",0},
|
||||
{ "_wxPyApp","_class_wxPyApp",0},
|
||||
{ "_class_wxPenList","_wxPenList",0},
|
||||
{ "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
|
||||
{ "_class_wxOutputStream","_wxOutputStream",0},
|
||||
{ "_wxLogTextCtrl","_class_wxLogTextCtrl",0},
|
||||
@@ -8819,9 +8831,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxCloseEvent","_wxCloseEvent",0},
|
||||
{ "_wxSashEvent","_class_wxSashEvent",0},
|
||||
{ "_wxBusyInfo","_class_wxBusyInfo",0},
|
||||
{ "_wxFontList","_class_wxFontList",0},
|
||||
{ "_class_wxMenuEvent","_wxMenuEvent",0},
|
||||
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
|
||||
{ "_wxJoystick","_class_wxJoystick",0},
|
||||
{ "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
|
||||
{ "_wxClientDC","_class_wxClientDC",0},
|
||||
{ "_wxMouseEvent","_class_wxMouseEvent",0},
|
||||
@@ -8985,6 +8997,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
|
||||
{ "_class_wxJoystickEvent","_wxJoystickEvent",0},
|
||||
{ "_class_wxTipProvider","_wxTipProvider",0},
|
||||
{ "_class_wxToggleButton","_wxToggleButton",0},
|
||||
{ "_class_wxMiniFrame","_wxMiniFrame",0},
|
||||
{ "_wxFontDialog","_class_wxFontDialog",0},
|
||||
{ "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0},
|
||||
@@ -9003,13 +9016,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxGauge","_class_wxGauge",0},
|
||||
{ "_class_wxCheckListBox","_wxCheckListBox",0},
|
||||
{ "_class_wxBusyInfo","_wxBusyInfo",0},
|
||||
{ "_class_wxJoystick","_wxJoystick",0},
|
||||
{ "_class_wxFontList","_wxFontList",0},
|
||||
{ "_class_wxCommandEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent},
|
||||
{ "_class_wxCommandEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent},
|
||||
{ "_class_wxCommandEvent","_wxCommandEvent",0},
|
||||
{ "_class_wxClientDC","_wxClientDC",0},
|
||||
{ "_class_wxSizeEvent","_wxSizeEvent",0},
|
||||
{ "_class_wxListCtrl","_wxListCtrl",0},
|
||||
{ "_wxBrushList","_class_wxBrushList",0},
|
||||
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
|
||||
{ "_class_wxLogNull","_wxLogNull",0},
|
||||
{ "_class_wxSize","_wxSize",0},
|
||||
@@ -9127,7 +9141,7 @@ SWIGEXPORT(void) initstc_c() {
|
||||
PyDict_SetItemString(d,"wxSTC_INDIC0_MASK", PyInt_FromLong((long) 32));
|
||||
PyDict_SetItemString(d,"wxSTC_INDIC1_MASK", PyInt_FromLong((long) 64));
|
||||
PyDict_SetItemString(d,"wxSTC_INDIC2_MASK", PyInt_FromLong((long) 128));
|
||||
PyDict_SetItemString(d,"wxSTC_INDICS_MASK", PyInt_FromLong((long) 32|64|128));
|
||||
PyDict_SetItemString(d,"wxSTC_INDICS_MASK", PyInt_FromLong((long) 224));
|
||||
PyDict_SetItemString(d,"wxSTC_PRINT_NORMAL", PyInt_FromLong((long) 0));
|
||||
PyDict_SetItemString(d,"wxSTC_PRINT_INVERTLIGHT", PyInt_FromLong((long) 1));
|
||||
PyDict_SetItemString(d,"wxSTC_PRINT_BLACKONWHITE", PyInt_FromLong((long) 2));
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
#include "export.h"
|
||||
#include "wx/stc/stc.h"
|
||||
%}
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
// Get all our defs from the REAL header file.
|
||||
|
||||
%include stc.h
|
||||
//%include SciLexer.h
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Python functions to act like the event macros
|
||||
|
@@ -1,23 +0,0 @@
|
||||
/* Definitions for Windows/Unix exporting */
|
||||
#if defined(__WIN32__)
|
||||
# if defined(_MSC_VER)
|
||||
# define SWIGEXPORT(a) __declspec(dllexport) a
|
||||
# else
|
||||
# if defined(__BORLANDC__)
|
||||
# define SWIGEXPORT(a) a _export
|
||||
# else
|
||||
# define SWIGEXPORT(a) a
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
SWIGEXPORT(void) initstc_c() {
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@ sit back and enjoy. Be sure to take a peek at the source code for each
|
||||
demo item so you can learn how to use the classes yourself.</p>
|
||||
|
||||
<p><b>wxPython</b> is brought to you by <b>Robin Dunn</b> and<br>
|
||||
<b>Total Control Software</b>, Copyright (c) 1997-2000.</p>
|
||||
<b>Total Control Software</b>, Copyright (c) 1997-2001.</p>
|
||||
|
||||
<p>
|
||||
<font size="-1">Please see <i>license.txt</i> for licensing information.</font>
|
||||
|
@@ -29,7 +29,7 @@ if wxPlatform == '__WXMSW__':
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class TestPanel(wxPanel):
|
||||
def __init__(self, parent):
|
||||
def __init__(self, parent, log):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
self.pdf = None
|
||||
|
||||
@@ -94,7 +94,7 @@ class TestPanel(wxPanel):
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
if wxPlatform == '__WXMSW__':
|
||||
win = TestPanel(nb)
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
else:
|
||||
dlg = wxMessageDialog(frame, 'This demo only works on MSW.',
|
||||
@@ -117,6 +117,7 @@ if __name__ == '__main__':
|
||||
EVT_CLOSE(self, self.OnCloseWindow)
|
||||
|
||||
def OnCloseWindow(self, event):
|
||||
|
||||
self.tp.pdf.Cleanup()
|
||||
self.Destroy()
|
||||
|
||||
|
114
wxPython/demo/ColourDB.py
Normal file
@@ -0,0 +1,114 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib import colourdb
|
||||
|
||||
import images
|
||||
|
||||
|
||||
# This loads a whole bunch of new color names and values
|
||||
# into wxTheColourDatabase
|
||||
|
||||
colourdb.updateColourDB()
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class TestWindow(wxScrolledWindow):
|
||||
def __init__(self, parent):
|
||||
wxScrolledWindow.__init__(self, parent, -1)
|
||||
|
||||
self.clrList = colourdb.getColourList()
|
||||
self.bg_bmp = images.getGridBGBitmap()
|
||||
|
||||
EVT_PAINT(self, self.OnPaint)
|
||||
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
|
||||
#self.SetBackgroundColour("WHITE")
|
||||
|
||||
self.font = wxFont(10, wxSWISS, wxNORMAL, wxNORMAL)
|
||||
dc = wxClientDC(self)
|
||||
dc.SetFont(self.font)
|
||||
|
||||
w,h,d,e = dc.GetFullTextExtent("Wy") # a wide character and one that decends
|
||||
self.textHeight = h + d
|
||||
self.lineHeight = self.textHeight + 5
|
||||
self.cellWidth = w
|
||||
|
||||
numCells = 24
|
||||
self.SetScrollbars(self.cellWidth, self.lineHeight, numCells, len(self.clrList) + 2)
|
||||
|
||||
|
||||
def TileBackground(self, dc):
|
||||
# tile the background bitmap
|
||||
sz = self.GetClientSize()
|
||||
w = self.bg_bmp.GetWidth()
|
||||
h = self.bg_bmp.GetHeight()
|
||||
|
||||
# adjust for scrolled position
|
||||
spx, spy = self.GetScrollPixelsPerUnit()
|
||||
vsx, vsy = self.GetViewStart()
|
||||
dx, dy = (spx * vsx) % w, (spy * vsy) % h
|
||||
|
||||
x = -dx
|
||||
while x < sz.width:
|
||||
y = -dy
|
||||
while y < sz.height:
|
||||
dc.DrawBitmap(self.bg_bmp, x, y)
|
||||
y = y + h
|
||||
x = x + w
|
||||
|
||||
|
||||
def OnEraseBackground(self, evt):
|
||||
dc = evt.GetDC()
|
||||
if not dc:
|
||||
dc = wxClientDC(self)
|
||||
self.TileBackground(dc)
|
||||
|
||||
|
||||
def OnPaint(self, evt):
|
||||
dc = wxPaintDC(self)
|
||||
self.PrepareDC(dc)
|
||||
self.Draw(dc, self.GetUpdateRegion(), self.GetViewStart())
|
||||
|
||||
|
||||
def Draw(self, dc, rgn=None, vs=None):
|
||||
dc.BeginDrawing()
|
||||
dc.SetTextForeground("BLACK")
|
||||
dc.SetPen(wxPen("BLACK", 1, wxSOLID))
|
||||
dc.SetFont(self.font)
|
||||
colours = self.clrList
|
||||
numColours = len(colours)
|
||||
|
||||
if rgn:
|
||||
# determine the subset that have been exposed and needs drawn
|
||||
rect = rgn.GetBox()
|
||||
pixStart = vs[1]*self.lineHeight + rect.y
|
||||
pixStop = pixStart + rect.height
|
||||
start = pixStart / self.lineHeight - 1
|
||||
stop = pixStop / self.lineHeight
|
||||
else:
|
||||
start = 0
|
||||
stop = len(numColours)
|
||||
|
||||
for line in range(max(0,start), min(stop,numColours)):
|
||||
clr = colours[line]
|
||||
y = (line+1) * self.lineHeight + 2
|
||||
dc.DrawText(clr, self.cellWidth, y)
|
||||
|
||||
brush = wxBrush(clr, wxSOLID)
|
||||
dc.SetBrush(brush)
|
||||
dc.DrawRectangle(12 * self.cellWidth, y, 6 * self.cellWidth, self.textHeight)
|
||||
|
||||
dc.EndDrawing()
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestWindow(nb)
|
||||
return win
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
overview = """
|
||||
"""
|
117
wxPython/demo/ColourSelect.py
Normal file
@@ -0,0 +1,117 @@
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: ColourSelect.py
|
||||
# Purpose: Colour Selection control display testing on panel for wxPython demo
|
||||
#
|
||||
# Author: Lorne White (email: lorne.white@telusplanet.net)
|
||||
#
|
||||
# Version 0.5
|
||||
# Date: Feb 26, 2001
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.colourselect import *
|
||||
import string
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class TestColourSelect(wxPanel):
|
||||
def __init__(self, parent, log):
|
||||
self.log = log
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
|
||||
wxStaticText(self, -1, "This example uses a colour selection control based on the wxButton and wxColourDialog Classes. Click Button to get Colour Values",
|
||||
wxPoint(10, 20), wxSize(400, 60))
|
||||
|
||||
self.x_pos = 30
|
||||
self.y_pos = 100
|
||||
delta = 40
|
||||
|
||||
mID = NewId()
|
||||
wxButton(self, mID, "Get All Colours", wxPoint(self.x_pos, self.y_pos))
|
||||
EVT_BUTTON(self, mID, self.OnClick)
|
||||
self.y_pos = self.y_pos + delta
|
||||
|
||||
wxStaticText(self, -1, "Default", wxPoint(self.x_pos, self.y_pos), wxSize(-1, -1)) # name
|
||||
self.colour_def = ColourSelect(self, wxPoint(self.x_pos+100, self.y_pos)) # default colour selection control
|
||||
|
||||
self.y_pos = self.y_pos + delta
|
||||
colours = [[255, 255, 0], [255, 0, 255], [0, 255, 0], [0, 0, 255]] # list of initial colours for display
|
||||
self.names = names = [ "Default Size", "Another Size", "Another Colour", "Larger"] # display names
|
||||
sizes = [ None, wxSize(60, 20), None, wxSize(60, 60)] # button sizes
|
||||
self.set_val = []
|
||||
|
||||
for i in range(len(colours)):
|
||||
wxStaticText(self, -1, names[i], wxPoint(self.x_pos, self.y_pos), wxSize(-1, -1)) # name
|
||||
|
||||
val = ColourSelect(self, wxPoint(self.x_pos+100, self.y_pos), colours[i], sizes[i]) # colour selection button
|
||||
self.set_val.append(val) # store control for reference
|
||||
self.y_pos = self.y_pos + delta
|
||||
|
||||
def OnClick(self, event):
|
||||
result = []
|
||||
colour = self.colour_def.GetColour() # default control value
|
||||
result.append("Default: " + str(colour))
|
||||
|
||||
for i in range(len(self.set_val)):
|
||||
val = self.set_val[i]
|
||||
colour = val.GetColour() # get the colour selection button result
|
||||
name = self.names[i]
|
||||
result.append(name + ": " + str(colour)) # create string list for easy viewing of results
|
||||
out_result = string.joinfields(result, ', ')
|
||||
self.log.WriteText("Colour Results :" + out_result)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestColourSelect(nb, log)
|
||||
return win
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
overview = """\
|
||||
A checkbox is a labelled box which is either on (checkmark is visible) or off (no checkmark).
|
||||
|
||||
wxCheckBox()
|
||||
-----------------------
|
||||
|
||||
Default constructor.
|
||||
|
||||
wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val, const wxString& name = "checkBox")
|
||||
|
||||
Constructor, creating and showing a checkbox.
|
||||
|
||||
Parameters
|
||||
-------------------
|
||||
|
||||
parent = Parent window. Must not be NULL.
|
||||
|
||||
id = Checkbox identifier. A value of -1 indicates a default value.
|
||||
|
||||
label = Text to be displayed next to the checkbox.
|
||||
|
||||
pos = Checkbox position. If the position (-1, -1) is specified then a default position is chosen.
|
||||
|
||||
size = Checkbox size. If the default size (-1, -1) is specified then a default size is chosen.
|
||||
|
||||
style = Window style. See wxCheckBox.
|
||||
|
||||
validator = Window validator.
|
||||
|
||||
name = Window name.
|
||||
"""
|
41
wxPython/demo/FancyText.py
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib import fancytext
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
test_str = ('<font style="italic" family="swiss" color="red" weight="bold" >'
|
||||
'some |<sup>23</sup> <angle/>text<sub>with <angle/> subscript</sub>'
|
||||
'</font> some other text')
|
||||
|
||||
test_str2 = '<font family="swiss" color="dark green" size="40">big green text</font>'
|
||||
|
||||
|
||||
class TestPanel(wxPanel):
|
||||
def __init__(self, parent):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
EVT_PAINT(self, self.OnPaint)
|
||||
|
||||
|
||||
def OnPaint(self, evt):
|
||||
dc = wxPaintDC(self)
|
||||
|
||||
sz = fancytext.getExtent(test_str, dc)
|
||||
fancytext.renderToDC(test_str, dc, 20, 20)
|
||||
|
||||
fancytext.renderToDC(test_str2, dc, 20, 20 + sz.height + 10)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb)
|
||||
return win
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
import string
|
||||
overview = string.replace(fancytext.__doc__, "<", "<")
|
||||
|
@@ -1,6 +1,10 @@
|
||||
""" Demonstrate filebrowsebutton module of the wxPython.lib Library.
|
||||
|
||||
14.1.2001 Bernhard Reiter <bernhard@intevation.de>
|
||||
Added demo for DirBrowseButton and improved overview text.
|
||||
"""
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.filebrowsebutton import FileBrowseButton, FileBrowseButtonWithHistory
|
||||
from wxPython.lib.filebrowsebutton import FileBrowseButton, FileBrowseButtonWithHistory,DirBrowseButton
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -15,6 +19,9 @@ class TestPanel(wxPanel):
|
||||
wxSize(450, -1),
|
||||
#changeCallback = self.fbbhCallback
|
||||
)
|
||||
self.dbb = DirBrowseButton(self, -1, wxPoint(20,80), wxSize(450,-1),
|
||||
changeCallback = self.dbbCallback)
|
||||
|
||||
|
||||
self.fbbh.SetHistory(['You', 'can', 'put', 'some', 'file', 'names', 'here'])
|
||||
|
||||
@@ -23,6 +30,7 @@ class TestPanel(wxPanel):
|
||||
self.log.write('FileBrowseButton: %s\n' % evt.GetString())
|
||||
|
||||
|
||||
|
||||
def fbbhCallback(self, evt):
|
||||
if hasattr(self, 'fbbh'):
|
||||
value = evt.GetString()
|
||||
@@ -31,6 +39,10 @@ class TestPanel(wxPanel):
|
||||
history.append(value)
|
||||
self.fbbh.SetHistory(history)
|
||||
|
||||
def dbbCallback(self, evt):
|
||||
self.log.write('DirBrowseButton: %s\n' % evt.GetString())
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
@@ -42,6 +54,23 @@ def runTest(frame, nb, log):
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
overview = """<html><body>
|
||||
<h2>class FileBrowseButton:</h2>
|
||||
<small><pre>
|
||||
%s
|
||||
</pre></small>
|
||||
|
||||
<h2>class FileBrowseButtonWithHistory(FileBrowseButton):</h2>
|
||||
<small><pre>
|
||||
%s
|
||||
</pre></small>
|
||||
|
||||
overview = FileBrowseButton.__doc__
|
||||
<h2>class DirBrowseButton(FileBrowseButton):</h2>
|
||||
<small><pre>
|
||||
%s
|
||||
</pre></small>
|
||||
|
||||
</body><</html>
|
||||
""" % ( FileBrowseButton.__doc__,
|
||||
FileBrowseButtonWithHistory.__doc__ ,
|
||||
str(DirBrowseButton.__doc__) )
|
||||
|
@@ -3,6 +3,7 @@ from wxPython.wx import *
|
||||
from wxPython.lib.buttons import wxGenButton, wxGenBitmapButton, \
|
||||
wxGenToggleButton, wxGenBitmapToggleButton
|
||||
|
||||
import images
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -34,18 +35,18 @@ class TestPanel(wxPanel):
|
||||
#b.SetUseFocusIndicator(false)
|
||||
b.SetToolTipString("This is a BIG button...")
|
||||
|
||||
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
||||
bmp = images.getTest2Bitmap()
|
||||
b = wxGenBitmapButton(self, -1, bmp, (10, 130))
|
||||
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||
|
||||
|
||||
b = wxGenBitmapButton(self, -1, None, (140, 130))
|
||||
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||
bmp = wxBitmap('bitmaps/lb1.bmp', wxBITMAP_TYPE_BMP)
|
||||
bmp = images.getBulb1Bitmap()
|
||||
mask = wxMaskColour(bmp, wxBLUE)
|
||||
bmp.SetMask(mask)
|
||||
b.SetBitmapLabel(bmp)
|
||||
bmp = wxBitmap('bitmaps/lb2.bmp', wxBITMAP_TYPE_BMP)
|
||||
bmp = images.getBulb2Bitmap()
|
||||
mask = wxMaskColour(bmp, wxBLUE)
|
||||
bmp.SetMask(mask)
|
||||
b.SetBitmapSelected(bmp)
|
||||
@@ -57,11 +58,11 @@ class TestPanel(wxPanel):
|
||||
|
||||
b = wxGenBitmapToggleButton(self, -1, None, (140, 230))
|
||||
EVT_BUTTON(self, b.GetId(), self.OnToggleButton)
|
||||
bmp = wxBitmap('bitmaps/lb1.bmp', wxBITMAP_TYPE_BMP)
|
||||
bmp = images.getBulb1Bitmap()
|
||||
mask = wxMaskColour(bmp, wxBLUE)
|
||||
bmp.SetMask(mask)
|
||||
b.SetBitmapLabel(bmp)
|
||||
bmp = wxBitmap('bitmaps/lb2.bmp', wxBITMAP_TYPE_BMP)
|
||||
bmp = images.getBulb2Bitmap()
|
||||
mask = wxMaskColour(bmp, wxBLUE)
|
||||
bmp.SetMask(mask)
|
||||
b.SetBitmapSelected(bmp)
|
||||
|
@@ -211,6 +211,7 @@ class GridEditorTest(wxGrid):
|
||||
self.SetColSize(1, 150)
|
||||
self.SetColSize(2, 150)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class TestFrame(wxFrame):
|
||||
|
@@ -37,6 +37,8 @@ class SimpleGrid(wxGrid):
|
||||
self.SetColLabelValue(1, "column")
|
||||
self.SetColLabelValue(2, "labels")
|
||||
|
||||
self.SetColLabelAlignment(wxALIGN_LEFT, wxALIGN_BOTTOM)
|
||||
|
||||
# test all the events
|
||||
EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick)
|
||||
EVT_GRID_CELL_RIGHT_CLICK(self, self.OnCellRightClick)
|
||||
|
40
wxPython/demo/ImageBrowser.py
Normal file
@@ -0,0 +1,40 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: ImageBrowser.py
|
||||
# Purpose: Image Selection dialog for wxPython demo
|
||||
#
|
||||
# Author: Lorne White (email: lorne.white@telusplanet.net)
|
||||
#
|
||||
# Version 0.5
|
||||
# Date: Feb 26, 2001
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.imagebrowser import *
|
||||
import os
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
dir = os.getcwd() # get working directory
|
||||
initial_dir = os.path.join(dir, 'bitmaps') # set the initial directory for the demo bitmaps
|
||||
win = ImageDialog(frame, initial_dir) # open the image browser dialog
|
||||
win.Centre()
|
||||
if win.ShowModal() == wxID_OK:
|
||||
log.WriteText("You Selected File: " + win.GetFile()) # show the selected file
|
||||
else:
|
||||
log.WriteText("You pressed Cancel\n")
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
overview = """\
|
||||
"""
|
140
wxPython/demo/LayoutAnchors.py
Normal file
@@ -0,0 +1,140 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.anchors import LayoutAnchors
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
[wxID_ANCHORSDEMOFRAMEANCHOREDPANEL, wxID_ANCHORSDEMOFRAMEHELPSTATICTEXT,
|
||||
wxID_ANCHORSDEMOFRAMEMAINPANEL, wxID_ANCHORSDEMOFRAMEBACKGROUNDPANEL,
|
||||
wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, wxID_ANCHORSDEMOFRAMEOKBUTTON,
|
||||
wxID_ANCHORSDEMOFRAMETOPCHECKBOX, wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX,
|
||||
wxID_ANCHORSDEMOFRAME, wxID_ANCHORSDEMOFRAMELEFTCHECKBOX,
|
||||
] = map(lambda _init_ctrls: wxNewId(), range(10))
|
||||
|
||||
class AnchorsDemoFrame(wxFrame):
|
||||
def _init_utils(self):
|
||||
pass
|
||||
|
||||
def _init_ctrls(self, prnt):
|
||||
wxFrame.__init__(self, size = wxSize(328, 187), id = wxID_ANCHORSDEMOFRAME, title = 'LayoutAnchors Demonstration', parent = prnt, name = 'AnchorsDemoFrame', style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN, pos = wxPoint(261, 123))
|
||||
self._init_utils()
|
||||
|
||||
self.mainPanel = wxPanel(size = wxSize(320, 160), parent = self, id = wxID_ANCHORSDEMOFRAMEMAINPANEL, name = 'panel1', style = wxTAB_TRAVERSAL | wxCLIP_CHILDREN, pos = wxPoint(0, 0))
|
||||
self.mainPanel.SetAutoLayout(true)
|
||||
|
||||
self.okButton = wxButton(label = 'OK', id = wxID_ANCHORSDEMOFRAMEOKBUTTON, parent = self.mainPanel, name = 'okButton', size = wxSize(72, 24), style = 0, pos = wxPoint(240, 128))
|
||||
self.okButton.SetConstraints(LayoutAnchors(self.okButton, false, false, true, true))
|
||||
EVT_BUTTON(self.okButton, wxID_ANCHORSDEMOFRAMEOKBUTTON, self.OnOkButtonButton)
|
||||
|
||||
self.backgroundPanel = wxPanel(size = wxSize(304, 80), parent = self.mainPanel, id = wxID_ANCHORSDEMOFRAMEBACKGROUNDPANEL, name = 'backgroundPanel', style = wxSIMPLE_BORDER | wxCLIP_CHILDREN, pos = wxPoint(8, 40))
|
||||
self.backgroundPanel.SetBackgroundColour(wxColour(255, 255, 255))
|
||||
self.backgroundPanel.SetConstraints(LayoutAnchors(self.backgroundPanel, true, true, true, true))
|
||||
|
||||
self.anchoredPanel = wxPanel(size = wxSize(88, 48), id = wxID_ANCHORSDEMOFRAMEANCHOREDPANEL, parent = self.backgroundPanel, name = 'anchoredPanel', style = wxSIMPLE_BORDER, pos = wxPoint(104, 16))
|
||||
self.anchoredPanel.SetBackgroundColour(wxColour(0, 0, 222))
|
||||
self.anchoredPanel.SetConstraints(LayoutAnchors(self.anchoredPanel, false, false, false, false))
|
||||
|
||||
self.leftCheckBox = wxCheckBox(label = 'Left', id = wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, parent = self.mainPanel, name = 'leftCheckBox', size = wxSize(40, 16), style = 0, pos = wxPoint(8, 8))
|
||||
self.leftCheckBox.SetConstraints(LayoutAnchors(self.leftCheckBox, false, true, false, false))
|
||||
EVT_CHECKBOX(self.leftCheckBox, wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, self.OnCheckboxCheckbox)
|
||||
|
||||
self.topCheckBox = wxCheckBox(label = 'Top', id = wxID_ANCHORSDEMOFRAMETOPCHECKBOX, parent = self.mainPanel, name = 'topCheckBox', size = wxSize(40, 16), style = 0, pos = wxPoint(88, 8))
|
||||
self.topCheckBox.SetConstraints(LayoutAnchors(self.topCheckBox, false, true, false, false))
|
||||
EVT_CHECKBOX(self.topCheckBox, wxID_ANCHORSDEMOFRAMETOPCHECKBOX, self.OnCheckboxCheckbox)
|
||||
|
||||
self.rightCheckBox = wxCheckBox(label = 'Right', id = wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, parent = self.mainPanel, name = 'rightCheckBox', size = wxSize(48, 16), style = 0, pos = wxPoint(168, 8))
|
||||
self.rightCheckBox.SetConstraints(LayoutAnchors(self.rightCheckBox, false, true, false, false))
|
||||
EVT_CHECKBOX(self.rightCheckBox, wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, self.OnCheckboxCheckbox)
|
||||
|
||||
self.bottomCheckBox = wxCheckBox(label = 'Bottom', id = wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, parent = self.mainPanel, name = 'bottomCheckBox', size = wxSize(56, 16), style = 0, pos = wxPoint(248, 8))
|
||||
self.bottomCheckBox.SetConstraints(LayoutAnchors(self.bottomCheckBox, false, true, false, false))
|
||||
EVT_CHECKBOX(self.bottomCheckBox, wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, self.OnCheckboxCheckbox)
|
||||
|
||||
self.helpStaticText = wxStaticText(label = 'Select anchor options above, then resize window to see the effect', id = wxID_ANCHORSDEMOFRAMEHELPSTATICTEXT, parent = self.mainPanel, name = 'helpStaticText', size = wxSize(224, 24), style = wxST_NO_AUTORESIZE, pos = wxPoint(8, 128))
|
||||
self.helpStaticText.SetConstraints(LayoutAnchors(self.helpStaticText, true, false, true, true))
|
||||
|
||||
def __init__(self, parent):
|
||||
self._init_ctrls(parent)
|
||||
|
||||
def OnCheckboxCheckbox(self, event):
|
||||
self.anchoredPanel.SetConstraints(
|
||||
LayoutAnchors(self.anchoredPanel,
|
||||
self.leftCheckBox.GetValue(), self.topCheckBox.GetValue(),
|
||||
self.rightCheckBox.GetValue(), self.bottomCheckBox.GetValue()) )
|
||||
|
||||
def OnOkButtonButton(self, event):
|
||||
self.Close()
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = AnchorsDemoFrame(frame)
|
||||
frame.otherWin = win
|
||||
win.Show(true)
|
||||
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
overview = """<html><body>
|
||||
<h2>LayoutAnchors</h2>
|
||||
A class that implements Delphi's Anchors with wxLayoutConstraints.
|
||||
<p>
|
||||
Anchored sides maintain the distance from the edge of the
|
||||
control to the same edge of the parent.
|
||||
When neither side is selected, the control keeps the same
|
||||
relative position to both sides.
|
||||
<p>
|
||||
The current position and size of the control and it's parent
|
||||
is used when setting up the constraints. To change the size or
|
||||
position of an already anchored control, set the constraints to
|
||||
None, reposition or resize and reapply the anchors.
|
||||
<p>
|
||||
Examples:
|
||||
<p>
|
||||
Let's anchor the right and bottom edge of a control and
|
||||
resize it's parent.
|
||||
<p>
|
||||
<pre>
|
||||
ctrl.SetConstraints(LayoutAnchors(ctrl, left=0, top=0, right=1, bottom=1))
|
||||
|
||||
+=========+ +===================+
|
||||
| +-----+ | | |
|
||||
| | * | -> | |
|
||||
| +--*--+ | | +-----+ |
|
||||
+---------+ | | * |
|
||||
| +--*--+ |
|
||||
+-------------------+
|
||||
* = anchored edge
|
||||
</pre>
|
||||
<p>
|
||||
When anchored on both sides the control will stretch horizontally.
|
||||
<p>
|
||||
<pre>
|
||||
ctrl.SetConstraints(LayoutAnchors(ctrl, 1, 0, 1, 1))
|
||||
|
||||
+=========+ +===================+
|
||||
| +-----+ | | |
|
||||
| * * | -> | |
|
||||
| +--*--+ | | +---------------+ |
|
||||
+---------+ | * ctrl * |
|
||||
| +-------*-------+ |
|
||||
+-------------------+
|
||||
* = anchored edge
|
||||
</pre>
|
||||
</html></body>
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -16,11 +16,14 @@ from wxPython.wx import *
|
||||
from wxPython.lib.splashscreen import SplashScreen
|
||||
from wxPython.html import wxHtmlWindow
|
||||
|
||||
import images
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
_treeList = [
|
||||
('New since last release', ['wxProcess',
|
||||
('New since last release', ['ColourSelect', 'ImageBrowser', 'infoframe',
|
||||
'ColourDB', 'wxToggleButton',
|
||||
]),
|
||||
|
||||
('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']),
|
||||
@@ -40,24 +43,24 @@ _treeList = [
|
||||
'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'wxTextCtrl',
|
||||
'wxTreeCtrl', 'wxSpinButton', 'wxSpinCtrl', 'wxStaticText',
|
||||
'wxStaticBitmap', 'wxRadioBox', 'wxSlider', 'wxToolBar',
|
||||
'wxCalendarCtrl',
|
||||
'wxCalendarCtrl', 'wxToggleButton',
|
||||
]),
|
||||
|
||||
('Window Layout', ['wxLayoutConstraints', 'Sizers', ]),
|
||||
('Window Layout', ['wxLayoutConstraints', 'LayoutAnchors', 'Sizers', ]),
|
||||
|
||||
('Miscellaneous', [ 'DragAndDrop', 'CustomDragAndDrop', 'FontEnumerator',
|
||||
'wxTimer', 'wxValidator', 'wxGLCanvas', 'DialogUnits',
|
||||
'wxImage', 'wxMask', 'PrintFramework', 'wxOGL',
|
||||
'PythonEvents', 'Threads',
|
||||
'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE',
|
||||
'wxDragImage',
|
||||
'wxDragImage', "wxProcess", "FancyText",
|
||||
]),
|
||||
|
||||
('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog',
|
||||
'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar',
|
||||
'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow',
|
||||
'FileBrowseButton', 'GenericButtons', 'wxEditor',
|
||||
'PyShellWindow',
|
||||
'PyShellWindow', 'ColourSelect', 'ImageBrowser',
|
||||
]),
|
||||
|
||||
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
|
||||
@@ -75,10 +78,17 @@ class wxPythonDemo(wxFrame):
|
||||
self.cwd = os.getcwd()
|
||||
self.curOverview = ""
|
||||
|
||||
if wxPlatform == '__WXMSW__':
|
||||
icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO)
|
||||
self.SetIcon(icon)
|
||||
if 1:
|
||||
icon = wxIconFromXPMData(images.getMondrianData())
|
||||
else:
|
||||
# another way to do it
|
||||
bmp = images.getMondrianBitmap()
|
||||
icon = wxEmptyIcon()
|
||||
icon.CopyFromBitmap(bmp)
|
||||
|
||||
self.SetIcon(icon)
|
||||
|
||||
if wxPlatform == '__WXMSW__':
|
||||
# setup a taskbar icon, and catch some events from it
|
||||
self.tbicon = wxTaskBarIcon()
|
||||
self.tbicon.SetIcon(icon, "wxPython Demo")
|
||||
@@ -91,6 +101,8 @@ class wxPythonDemo(wxFrame):
|
||||
self.otherWin = None
|
||||
EVT_IDLE(self, self.OnIdle)
|
||||
EVT_CLOSE(self, self.OnCloseWindow)
|
||||
EVT_ICONIZE(self, self.OnIconfiy)
|
||||
EVT_MAXIMIZE(self, self.OnMaximize)
|
||||
|
||||
self.Centre(wxBOTH)
|
||||
self.CreateStatusBar(1, wxST_SIZEGRIP)
|
||||
@@ -172,7 +184,7 @@ class wxPythonDemo(wxFrame):
|
||||
self.ovr = wxHtmlWindow(self.nb, -1, size=(400, 400))
|
||||
self.nb.AddPage(self.ovr, "Overview")
|
||||
|
||||
else: # hopefully I can remove this hacky code soon
|
||||
else: # hopefully I can remove this hacky code soon, see bug #216861
|
||||
panel = wxPanel(self.nb, -1)
|
||||
self.ovr = wxHtmlWindow(panel, -1, size=(400, 400))
|
||||
self.nb.AddPage(panel, "Overview")
|
||||
@@ -403,6 +415,19 @@ class wxPythonDemo(wxFrame):
|
||||
wxGetApp().ProcessIdle()
|
||||
|
||||
|
||||
#---------------------------------------------
|
||||
def OnIconfiy(self, evt):
|
||||
wxLogMessage("OnIconfiy")
|
||||
evt.Skip()
|
||||
|
||||
#---------------------------------------------
|
||||
def OnMaximize(self, evt):
|
||||
wxLogMessage("OnMaximize")
|
||||
evt.Skip()
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 990 B After Width: | Height: | Size: 990 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 630 B |
BIN
wxPython/demo/bmp_source/GridBG.gif
Normal file
After Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
BIN
wxPython/demo/bmp_source/robin.jpg
Normal file
After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
@@ -20,6 +20,8 @@ while line:
|
||||
line = line[:-1]
|
||||
sys.stdout.write('\nYou typed "%s"\n' % line)
|
||||
sys.stdout.flush()
|
||||
#sys.stderr.write('\nTyped you "%s" Yoda say...\n' % line)
|
||||
#sys.stderr.flush()
|
||||
line = sys.stdin.readline()
|
||||
|
||||
|
||||
|
BIN
wxPython/demo/data/pic2.gif
Normal file
After Width: | Height: | Size: 9.0 KiB |
@@ -57,6 +57,10 @@ display some tiny nice image</TT>, he?</FONT>
|
||||
this is text......
|
||||
<BR><A HREF="pic.png"><IMG SRC="pic.png" ALT="Testing image image" HEIGHT=160 WIDTH=100 ALIGN=TEXTTOP></A> (try clicking on the image :-) and
|
||||
this is text......
|
||||
|
||||
<br>
|
||||
Here is a GIF: <IMG SRC="pic2.gif">
|
||||
|
||||
<BR>
|
||||
<BR>
|
||||
<UL>
|
||||
|
57
wxPython/demo/encode_bitmaps.py
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env python
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
"""
|
||||
This is a way to save the startup time when running img2py on lots of
|
||||
files...
|
||||
"""
|
||||
|
||||
import sys, string
|
||||
sys.path.insert(0, "../tools")
|
||||
|
||||
import img2py
|
||||
|
||||
|
||||
command_lines = [
|
||||
" -n Mondrian bmp_source/mondrian.ico images.py",
|
||||
|
||||
"-a -n _10s_ bmp_source/10s.gif images.py",
|
||||
"-a -n _01c_ bmp_source/01c.gif images.py",
|
||||
"-a -n _12h_ bmp_source/12h.gif images.py",
|
||||
"-a -n _13d_ bmp_source/13d.gif images.py",
|
||||
"-a -n Background bmp_source/backgrnd.png images.py",
|
||||
"-a -n TestStar -m #FFFFFF bmp_source/teststar.png images.py",
|
||||
"-a -n TestStar2 bmp_source/teststar.png images.py",
|
||||
"-a -n TestMask bmp_source/testmask.bmp images.py",
|
||||
|
||||
"-a -n Test2 bmp_source/test2.bmp images.py",
|
||||
"-a -n Robin bmp_source/robin.jpg images.py",
|
||||
|
||||
"-a -n Bulb1 bmp_source/lb1.bmp images.py",
|
||||
"-a -n Bulb2 bmp_source/lb2.bmp images.py",
|
||||
|
||||
"-a -n Calendar bmp_source/Calend.bmp images.py",
|
||||
"-a -n DbDec bmp_source/DbDec.bmp images.py",
|
||||
"-a -n Dec bmp_source/Dec.bmp images.py",
|
||||
"-a -n Pt bmp_source/Pt.bmp images.py",
|
||||
"-a -n DbInc bmp_source/DbInc.bmp images.py",
|
||||
"-a -n Inc bmp_source/Inc.bmp images.py",
|
||||
|
||||
"-a -n New -m #C0C0C0 bmp_source/new.bmp images.py",
|
||||
"-a -n Open -m #C0C0C0 bmp_source/open.bmp images.py",
|
||||
"-a -n Copy -m #C0C0C0 bmp_source/copy.bmp images.py",
|
||||
"-a -n Paste -m #C0C0C0 bmp_source/paste.bmp images.py",
|
||||
"-a -n Tog1 -m #C0C0C0 bmp_source/tog1.bmp images.py",
|
||||
"-a -n Tog2 -m #C0C0C0 bmp_source/tog2.bmp images.py",
|
||||
|
||||
"-a -n Smiles bmp_source/smiles.bmp images.py",
|
||||
|
||||
"-a -n GridBG bmp_source/GridBG.gif images.py",
|
||||
|
||||
]
|
||||
|
||||
|
||||
for line in command_lines:
|
||||
args = string.split(line)
|
||||
img2py.main(args)
|
||||
|
5206
wxPython/demo/images.py
Normal file
95
wxPython/demo/infoframe.py
Normal file
@@ -0,0 +1,95 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.infoframe import *
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class MyFrame(wxFrame):
|
||||
def __init__(self,output):
|
||||
wxFrame.__init__(self,None,-1,"Close me...",size=(300,100))
|
||||
menubar = wxMenuBar()
|
||||
menu = wxMenu()
|
||||
mID = NewId()
|
||||
menu.Append(mID,"&Enable output","Display output frame")
|
||||
EVT_MENU(self,mID,output.EnableOutput)
|
||||
mID = NewId()
|
||||
menu.Append(mID,"&Disable output","Close output frame")
|
||||
EVT_MENU(self,mID,output.DisableOutput)
|
||||
menubar.Append(menu,"&Output")
|
||||
self.SetMenuBar(menubar)
|
||||
output.SetParent(self)
|
||||
output.SetOtherMenuBar(menubar,menuname="Output")
|
||||
EVT_CLOSE(self,self.OnClose)
|
||||
EVT_TIMER(self, -1, self.OnTimer)
|
||||
|
||||
self.timer = wxTimer(self, -1)
|
||||
self.timer.Start(1000)
|
||||
|
||||
self.save_stdout = sys.stdout
|
||||
sys.stdout = self.output = output
|
||||
print "Hello!"
|
||||
|
||||
def OnClose(self,event):
|
||||
sys.stdout = self.save_stdout
|
||||
self.output.close()
|
||||
self.timer.Stop()
|
||||
self.timer = None
|
||||
self.Destroy()
|
||||
|
||||
def OnTimer(self, evt):
|
||||
print "This was printed with \"print\""
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
from wxPython.lib import infoframe
|
||||
overview = infoframe.__doc__
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
"""
|
||||
This method is used by the wxPython Demo Framework for integrating
|
||||
this demo with the rest.
|
||||
"""
|
||||
win = MyFrame(wxPyInformationalMessagesFrame())
|
||||
frame.otherWin = win
|
||||
win.Show(1)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
if __name__ == "__main__":
|
||||
## class MyFrame(wxFrame):
|
||||
## def __init__(self,output):
|
||||
## wxFrame.__init__(self,None,-1,"Close me...",size=(300,100))
|
||||
## EVT_CLOSE(self,self.OnClose)
|
||||
## menubar = wxMenuBar()
|
||||
## menu = wxMenu()
|
||||
## mID = NewId()
|
||||
## menu.Append(mID,"&Enable output","Display output frame")
|
||||
## EVT_MENU(self,mID,output.EnableOutput)
|
||||
## mID = NewId()
|
||||
## menu.Append(mID,"&Disable output","Close output frame")
|
||||
## EVT_MENU(self,mID,output.DisableOutput)
|
||||
## menubar.Append(menu,"&Output")
|
||||
## self.SetMenuBar(menubar)
|
||||
## output.SetOtherMenuBar(menubar,menuname="Output")
|
||||
|
||||
## def OnClose(self,event):
|
||||
## if isinstance(sys.stdout,wxPyInformationalMessagesFrame):
|
||||
## sys.stdout.close()
|
||||
## self.Destroy()
|
||||
|
||||
class MyApp(wxApp):
|
||||
outputWindowClass = wxPyInformationalMessagesFrame
|
||||
def OnInit(self):
|
||||
frame = MyFrame(self.stdioWin)
|
||||
frame.Show(TRUE)
|
||||
self.SetTopWindow(frame)
|
||||
if isinstance(sys.stdout,wxPyInformationalMessagesFrame):
|
||||
sys.stdout.SetParent(frame)
|
||||
#self.redirectStdio(None)# this is done automatically
|
||||
# by the MyApp(1) call below
|
||||
print "Starting.\n",
|
||||
return true
|
||||
|
||||
app = MyApp(1)
|
||||
app.MainLoop()
|
@@ -24,7 +24,7 @@ beautifully documented...
|
||||
"""
|
||||
|
||||
from wxPython import wx
|
||||
import string # Don't use it, but it's fun expanding :-)
|
||||
import sys, string # Don't use it, but it's fun expanding :-)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
@@ -161,7 +161,8 @@ def runTest(frame, nb, log):
|
||||
This method is used by the wxPython Demo Framework for integrating
|
||||
this demo with the rest.
|
||||
"""
|
||||
thisModule = __import__(__name__, globals())
|
||||
#thisModule = __import__(__name__, globals())
|
||||
thisModule = sys.modules[__name__]
|
||||
win = wx.wxFrame(frame, -1, "PyTreeItemData Test")
|
||||
split = wx.wxSplitterWindow(win, -1)
|
||||
tree = pyTree(split, -1, thisModule)
|
||||
|
@@ -1,6 +1,8 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
|
||||
import images
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class TestPanel(wxPanel):
|
||||
@@ -19,8 +21,7 @@ class TestPanel(wxPanel):
|
||||
|
||||
b.SetToolTipString("This is a Hello button...")
|
||||
|
||||
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
||||
|
||||
bmp = images.getTest2Bitmap()
|
||||
mask = wxMaskColour(bmp, wxBLUE)
|
||||
bmp.SetMask(mask)
|
||||
|
||||
|
@@ -4,16 +4,16 @@
|
||||
#
|
||||
# Author: Lorne White (email: lwhite1@planet.eon.net)
|
||||
#
|
||||
# Created:
|
||||
# Version 0.8 2000/04/16
|
||||
# Version 0.9
|
||||
# Date: Feb 26, 2001
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.calendar import wxCalendar, Month, PrtCalDraw
|
||||
from wxPython.lib.calendar import wxCalendar, Month, PrtCalDraw, CalenDlg
|
||||
|
||||
import images
|
||||
import os
|
||||
dir_path = os.getcwd()
|
||||
|
||||
|
||||
# highlighted days in month
|
||||
@@ -51,15 +51,19 @@ class TestPanel(wxPanel):
|
||||
|
||||
self.calend = wxCalendar(self, -1, wxPoint(100, 50), wxSize(200, 180))
|
||||
|
||||
start_month = 11
|
||||
start_year = 1999
|
||||
# start_month = 2 # preselect the date for calendar
|
||||
# start_year = 2001
|
||||
|
||||
start_month = self.calend.GetMonth() # get the current month & year
|
||||
start_year = self.calend.GetYear()
|
||||
|
||||
# month list from DateTime module
|
||||
|
||||
monthlist = GetMonthList()
|
||||
|
||||
self.date = wxComboBox(self, 10, Month[start_month], wxPoint(100, 20), wxSize(90, -1), monthlist, wxCB_DROPDOWN)
|
||||
EVT_COMBOBOX(self, 10, self.EvtComboBox)
|
||||
mID = NewId()
|
||||
self.date = wxComboBox(self, mID, Month[start_month], wxPoint(100, 20), wxSize(90, -1), monthlist, wxCB_DROPDOWN)
|
||||
EVT_COMBOBOX(self, mID, self.EvtComboBox)
|
||||
|
||||
# set start month and year
|
||||
|
||||
@@ -82,49 +86,59 @@ class TestPanel(wxPanel):
|
||||
|
||||
# scroll bar for month selection
|
||||
|
||||
self.scroll = wxScrollBar(self, 40, wxPoint(100, 240), wxSize(200, 20), wxSB_HORIZONTAL)
|
||||
mID = NewId()
|
||||
self.scroll = wxScrollBar(self, mID, wxPoint(100, 240), wxSize(200, 20), wxSB_HORIZONTAL)
|
||||
self.scroll.SetScrollbar(start_month-1, 1, 12, 1, TRUE)
|
||||
EVT_COMMAND_SCROLL(self, 40, self.Scroll)
|
||||
EVT_COMMAND_SCROLL(self, mID, self.Scroll)
|
||||
|
||||
# spin control for year selection
|
||||
|
||||
self.dtext = wxTextCtrl(self, -1, str(start_year), wxPoint(200, 20), wxSize(60, -1))
|
||||
h = self.dtext.GetSize().height
|
||||
|
||||
self.spin = wxSpinButton(self, 20, wxPoint(270, 20), wxSize(h*2, h))
|
||||
mID = NewId()
|
||||
self.spin = wxSpinButton(self, mID, wxPoint(270, 20), wxSize(h*2, h))
|
||||
self.spin.SetRange(1980, 2010)
|
||||
self.spin.SetValue(start_year)
|
||||
EVT_SPIN(self, 20, self.OnSpin)
|
||||
EVT_SPIN(self, mID, self.OnSpin)
|
||||
|
||||
# button for calendar dialog test
|
||||
|
||||
wxStaticText(self, -1, "Test Calendar Dialog", wxPoint(350, 50), wxSize(150, -1))
|
||||
|
||||
bmp = wxBitmap('bitmaps/Calend.bmp', wxBITMAP_TYPE_BMP)
|
||||
self.but = wxBitmapButton(self, 60, bmp, wxPoint(380, 80))#, wxSize(30, 30))
|
||||
EVT_BUTTON(self, 60, self.TestDlg)
|
||||
mID = NewId()
|
||||
bmp = images.getCalendarBitmap()
|
||||
self.but = wxBitmapButton(self, mID, bmp, wxPoint(380, 80))#, wxSize(30, 30))
|
||||
EVT_BUTTON(self, mID, self.TestDlg)
|
||||
|
||||
# button for calendar window test
|
||||
|
||||
wxStaticText(self, -1, "Test Calendar Window", wxPoint(350, 150), wxSize(150, -1))
|
||||
|
||||
bmp = wxBitmap('bitmaps/Calend.bmp', wxBITMAP_TYPE_BMP)
|
||||
self.but = wxBitmapButton(self, 160, bmp, wxPoint(380, 180))#, wxSize(30, 30))
|
||||
EVT_BUTTON(self, 160, self.TestFrame)
|
||||
mID = NewId()
|
||||
self.but = wxBitmapButton(self, mID, bmp, wxPoint(380, 180))#, wxSize(30, 30))
|
||||
EVT_BUTTON(self, mID, self.TestFrame)
|
||||
|
||||
wxStaticText(self, -1, "Test Calendar Print", wxPoint(350, 250), wxSize(150, -1))
|
||||
|
||||
bmp = wxBitmap('bitmaps/Calend.bmp', wxBITMAP_TYPE_BMP)
|
||||
self.but = wxBitmapButton(self, 170, bmp, wxPoint(380, 280))#, wxSize(30, 30))
|
||||
EVT_BUTTON(self, 170, self.OnPreview)
|
||||
mID = NewId()
|
||||
self.but = wxBitmapButton(self, mID, bmp, wxPoint(380, 280))#, wxSize(30, 30))
|
||||
EVT_BUTTON(self, mID, self.OnPreview)
|
||||
|
||||
# calendar dialog
|
||||
|
||||
def TestDlg(self, event):
|
||||
dlg = CalenDlg(self, self.log)
|
||||
def TestDlg(self, event): # test the date dialog
|
||||
dlg = CalenDlg(self)
|
||||
dlg.Centre()
|
||||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
if dlg.ShowModal() == wxID_OK:
|
||||
result = dlg.result
|
||||
day = result[1]
|
||||
month = result[2]
|
||||
year = result[3]
|
||||
new_date = str(month) + '/'+ str(day) + '/'+ str(year)
|
||||
self.log.WriteText('Date Selected: %s\n' % new_date)
|
||||
else:
|
||||
self.log.WriteText('No Date Selected')
|
||||
|
||||
# calendar window test
|
||||
|
||||
@@ -211,105 +225,6 @@ class TestPanel(wxPanel):
|
||||
self.calend.SetCurrentDay()
|
||||
self.ResetDisplay()
|
||||
|
||||
# test the calendar control in a dialog
|
||||
|
||||
class CalenDlg(wxDialog):
|
||||
def __init__(self, parent, log):
|
||||
self.log = log
|
||||
wxDialog.__init__(self, parent, -1, "Test Calendar", wxPyDefaultPosition, wxSize(280, 300))
|
||||
|
||||
start_month = 2
|
||||
start_year = 1999
|
||||
|
||||
# get month list from DateTime
|
||||
|
||||
monthlist = GetMonthList()
|
||||
|
||||
# select the month
|
||||
|
||||
self.date = wxComboBox(self, 100, Month[start_month], wxPoint(20, 20), wxSize(90, -1), monthlist, wxCB_DROPDOWN)
|
||||
EVT_COMBOBOX(self, 100, self.EvtComboBox)
|
||||
|
||||
# alternate spin button to control the month
|
||||
|
||||
h = self.date.GetSize().height
|
||||
self.m_spin = wxSpinButton(self, 120, wxPoint(120, 20), wxSize(h*2, h), wxSP_VERTICAL)
|
||||
self.m_spin.SetRange(1, 12)
|
||||
self.m_spin.SetValue(start_month)
|
||||
|
||||
EVT_SPIN(self, 120, self.OnMonthSpin)
|
||||
|
||||
# spin button to conrol the year
|
||||
|
||||
self.dtext = wxTextCtrl(self, -1, str(start_year), wxPoint(160, 20), wxSize(60, -1))
|
||||
h = self.dtext.GetSize().height
|
||||
|
||||
self.y_spin = wxSpinButton(self, 20, wxPoint(220, 20), wxSize(h*2, h), wxSP_VERTICAL)
|
||||
self.y_spin.SetRange(1980, 2010)
|
||||
self.y_spin.SetValue(start_year)
|
||||
|
||||
EVT_SPIN(self, 20, self.OnYrSpin)
|
||||
|
||||
# set the calendar and attributes
|
||||
|
||||
self.calend = wxCalendar(self, -1, wxPoint(20, 60), wxSize(240, 200))
|
||||
self.calend.SetMonth(start_month)
|
||||
self.calend.SetYear(start_year)
|
||||
|
||||
self.calend.HideTitle()
|
||||
self.calend.ShowWeekEnd()
|
||||
|
||||
self.ResetDisplay()
|
||||
|
||||
self.Connect(self.calend.GetId(), -1, 2100, self.MouseClick)
|
||||
|
||||
# log the mouse clicks
|
||||
|
||||
def MouseClick(self, evt):
|
||||
text = '%s CLICK %02d/%02d/%d' % (evt.click, evt.day, evt.month, evt.year) # format date
|
||||
self.log.WriteText('Date Selected: ' + text + '\n')
|
||||
|
||||
if evt.click == 'DLEFT':
|
||||
self.EndModal(wxID_OK)
|
||||
|
||||
# month and year spin selection routines
|
||||
|
||||
def OnMonthSpin(self, event):
|
||||
month = event.GetPosition()
|
||||
if month >= 0 and month <= 12:
|
||||
self.date.SetValue(Month[month])
|
||||
self.calend.SetMonth(month)
|
||||
self.calend.Refresh()
|
||||
|
||||
def OnYrSpin(self, event):
|
||||
year = event.GetPosition()
|
||||
self.dtext.SetValue(str(year))
|
||||
self.calend.SetYear(year)
|
||||
self.calend.Refresh()
|
||||
|
||||
def EvtComboBox(self, event):
|
||||
name = event.GetString()
|
||||
self.log.WriteText('EvtComboBox: %s\n' % name)
|
||||
monthval = self.date.FindString(name)
|
||||
self.m_spin.SetValue(monthval+1)
|
||||
|
||||
self.calend.SetMonth(monthval+1)
|
||||
self.ResetDisplay()
|
||||
|
||||
# set the calendar for highlighted days
|
||||
|
||||
def ResetDisplay(self):
|
||||
month = self.calend.GetMonth()
|
||||
try:
|
||||
set_days = test_days[month]
|
||||
except:
|
||||
set_days = [1, 5, 12]
|
||||
|
||||
self.calend.AddSelect([4, 11], 'BLUE', 'WHITE')
|
||||
|
||||
self.calend.SetSelDay(set_days)
|
||||
self.calend.Refresh()
|
||||
|
||||
# test of full window calendar control functions
|
||||
|
||||
class CalendFrame(wxFrame):
|
||||
@@ -399,21 +314,25 @@ class CalendFrame(wxFrame):
|
||||
def MakeToolMenu(self):
|
||||
tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER)
|
||||
|
||||
bmp_path = 'bitmaps/'
|
||||
SetToolPath(self, tb, 10, bmp_path + 'DbDec.bmp', 'Dec Year')
|
||||
EVT_TOOL(self, 10, self.OnDecYear)
|
||||
mID = NewId()
|
||||
SetToolPath(self, tb, mID, images.getDbDecBitmap(), 'Dec Year')
|
||||
EVT_TOOL(self, mID, self.OnDecYear)
|
||||
|
||||
SetToolPath(self, tb, 15, bmp_path + 'Dec.bmp', 'Dec Month')
|
||||
EVT_TOOL(self, 15, self.OnDecMonth)
|
||||
mID = NewId()
|
||||
SetToolPath(self, tb, mID, images.getDecBitmap(), 'Dec Month')
|
||||
EVT_TOOL(self, mID, self.OnDecMonth)
|
||||
|
||||
SetToolPath(self, tb, 30, bmp_path + 'Pt.bmp', 'Current Month')
|
||||
EVT_TOOL(self, 30, self.OnCurrent)
|
||||
mID = NewId()
|
||||
SetToolPath(self, tb, mID, images.getPtBitmap(), 'Current Month')
|
||||
EVT_TOOL(self, mID, self.OnCurrent)
|
||||
|
||||
SetToolPath(self, tb, 40, bmp_path + 'Inc.bmp', 'Inc Month')
|
||||
EVT_TOOL(self, 40, self.OnIncMonth)
|
||||
mID = NewId()
|
||||
SetToolPath(self, tb, mID, images.getIncBitmap(), 'Inc Month')
|
||||
EVT_TOOL(self, mID, self.OnIncMonth)
|
||||
|
||||
SetToolPath(self, tb, 45, bmp_path + 'DbInc.bmp', 'Inc Year')
|
||||
EVT_TOOL(self, 45, self.OnIncYear)
|
||||
mID = NewId()
|
||||
SetToolPath(self, tb, mID, images.getDbIncBitmap(), 'Inc Year')
|
||||
EVT_TOOL(self, mID, self.OnIncYear)
|
||||
|
||||
tb.Realize()
|
||||
|
||||
@@ -595,9 +514,7 @@ class PrintCalend:
|
||||
self.ptheight = height
|
||||
|
||||
def SetToolPath(self, tb, id, bmp, title):
|
||||
global dir_path
|
||||
tb.AddSimpleTool(id, wxBitmap(os.path.join(dir_path, bmp), wxBITMAP_TYPE_BMP),
|
||||
title, title)
|
||||
tb.AddSimpleTool(id, bmp, title, title)
|
||||
|
||||
class SetPrintout(wxPrintout):
|
||||
def __init__(self, canvas):
|
||||
|
@@ -15,8 +15,8 @@ class TestChoice(wxPanel):
|
||||
wxPoint(15, 10))
|
||||
|
||||
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 20))
|
||||
wxChoice(self, 40, wxPoint(80, 50), wxSize(95, 20), #wxDefaultSize,
|
||||
sampleList)
|
||||
wxChoice(self, 40, (80, 50), (95, 125),
|
||||
choices = sampleList)
|
||||
EVT_CHOICE(self, 40, self.EvtChoice)
|
||||
|
||||
def EvtChoice(self, event):
|
||||
|
@@ -4,9 +4,8 @@ from wxPython.wx import *
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
data = wxColourData()
|
||||
data.SetChooseFull(true)
|
||||
dlg = wxColourDialog(frame, data)
|
||||
dlg = wxColourDialog(frame)
|
||||
dlg.GetColourData().SetChooseFull(true)
|
||||
if dlg.ShowModal() == wxID_OK:
|
||||
data = dlg.GetColourData()
|
||||
log.WriteText('You selected: %s\n' % str(data.GetColour().Get()))
|
||||
|
@@ -1,6 +1,8 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
|
||||
import images
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class DragShape:
|
||||
@@ -47,14 +49,14 @@ class DragCanvas(wxScrolledWindow):
|
||||
self.dragShape = None
|
||||
|
||||
self.SetCursor(wxStockCursor(wxCURSOR_ARROW))
|
||||
self.bg_bmp = wxBitmap('bitmaps/backgrnd.png', wxBITMAP_TYPE_PNG)
|
||||
self.bg_bmp = images.getBackgroundBitmap()
|
||||
|
||||
|
||||
# Make a shape from an image and mask. This one will demo
|
||||
# dragging outside the window
|
||||
bmp = wxBitmap('bitmaps/test_image.png', wxBITMAP_TYPE_PNG)
|
||||
mask = wxMaskColour(bmp, wxWHITE)
|
||||
bmp.SetMask(mask)
|
||||
bmp = images.getTestStarBitmap()
|
||||
#mask = wxMaskColour(bmp, wxWHITE)
|
||||
#bmp.SetMask(mask)
|
||||
shape = DragShape(bmp)
|
||||
shape.pos = wxPoint(5, 5)
|
||||
shape.fullscreen = true
|
||||
@@ -84,8 +86,9 @@ class DragCanvas(wxScrolledWindow):
|
||||
|
||||
# Make some shapes from some playing card images.
|
||||
x = 200
|
||||
for card in ['01c.gif', '10s.gif', '12h.gif', '13d.gif']:
|
||||
bmp = wxBitmap('bitmaps/'+card, wxBITMAP_TYPE_GIF)
|
||||
for card in ['_01c_', '_12h_', '_13d_', '_10s_']:
|
||||
bmpFunc = getattr(images, "get%sBitmap" % card)
|
||||
bmp = bmpFunc()
|
||||
shape = DragShape(bmp)
|
||||
shape.pos = wxPoint(x, 5)
|
||||
self.shapes.append(shape)
|
||||
|
@@ -1,6 +1,9 @@
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.floatbar import *
|
||||
|
||||
import images
|
||||
|
||||
|
||||
class TestFloatBar(wxFrame):
|
||||
def __init__(self, parent, log):
|
||||
wxFrame.__init__(self, parent, -1, 'Test ToolBar',
|
||||
@@ -17,32 +20,28 @@ class TestFloatBar(wxFrame):
|
||||
tb.SetFloatable(1)
|
||||
tb.SetTitle("Floating!")
|
||||
self.CreateStatusBar()
|
||||
tb.AddSimpleTool(10, wxBitmap('bitmaps/new.bmp', wxBITMAP_TYPE_BMP),
|
||||
"New", "Long help for 'New'")
|
||||
|
||||
tb.AddSimpleTool(10, images.getNewBitmap(), "New", "Long help for 'New'")
|
||||
EVT_TOOL(self, 10, self.OnToolClick)
|
||||
EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick)
|
||||
|
||||
tb.AddSimpleTool(20, wxBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP),
|
||||
"Open")
|
||||
tb.AddSimpleTool(20, images.getOpenBitmap(), "Open")
|
||||
EVT_TOOL(self, 20, self.OnToolClick)
|
||||
EVT_TOOL_RCLICKED(self, 20, self.OnToolRClick)
|
||||
|
||||
tb.AddSeparator()
|
||||
tb.AddSimpleTool(30, wxBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP),
|
||||
"Copy")
|
||||
tb.AddSimpleTool(30, images.getCopyBitmap(), "Copy")
|
||||
EVT_TOOL(self, 30, self.OnToolClick)
|
||||
EVT_TOOL_RCLICKED(self, 30, self.OnToolRClick)
|
||||
|
||||
tb.AddSimpleTool(40, wxBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP),
|
||||
"Paste")
|
||||
tb.AddSimpleTool(40, images.getPasteBitmap(), "Paste")
|
||||
EVT_TOOL(self, 40, self.OnToolClick)
|
||||
EVT_TOOL_RCLICKED(self, 40, self.OnToolRClick)
|
||||
|
||||
tb.AddSeparator()
|
||||
|
||||
|
||||
tb.AddTool(60, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
|
||||
wxBitmap('bitmaps/tog2.bmp', wxBITMAP_TYPE_BMP),
|
||||
tb.AddTool(60, images.getTog1Bitmap(), images.getTog2Bitmap(),
|
||||
shortHelpString="Toggle with 2 bitmaps", isToggle=true)
|
||||
EVT_TOOL(self, 60, self.OnToolClick)
|
||||
EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick)
|
||||
|
@@ -66,7 +66,7 @@ class TestListBox(wxPanel):
|
||||
EVT_LISTBOX(self, 60, self.EvtListBox)
|
||||
EVT_LISTBOX_DCLICK(self, 60, self.EvtListBoxDClick)
|
||||
EVT_RIGHT_UP(self.lb1, self.EvtRightButton)
|
||||
self.lb1.SetSelection(0)
|
||||
self.lb1.SetSelection(3)
|
||||
|
||||
|
||||
wxStaticText(self, -1, "Select many:", wxPoint(200, 50), wxSize(65, 18))
|
||||
|
@@ -57,6 +57,7 @@ musicdata = {
|
||||
39: ("Yes", "Rhythm Of Love", "Rock"),
|
||||
}
|
||||
|
||||
import images
|
||||
|
||||
class TestListCtrlPanel(wxPanel):
|
||||
def __init__(self, parent, log):
|
||||
@@ -66,7 +67,7 @@ class TestListCtrlPanel(wxPanel):
|
||||
tID = wxNewId()
|
||||
|
||||
self.il = wxImageList(16, 16)
|
||||
bmp = wxBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP)
|
||||
bmp = images.getSmilesBitmap()
|
||||
idx1 = self.il.AddWithColourMask(bmp, wxWHITE)
|
||||
|
||||
self.list = wxListCtrl(self, tID,
|
||||
|
@@ -26,19 +26,21 @@ logicList = [
|
||||
('wxXOR', wxXOR),
|
||||
]
|
||||
|
||||
import images
|
||||
|
||||
class TestMaskWindow(wxScrolledWindow):
|
||||
def __init__(self, parent):
|
||||
wxScrolledWindow.__init__(self, parent, -1)
|
||||
self.SetBackgroundColour(wxColour(0,128,0))
|
||||
|
||||
# A reference bitmap that we won't mask
|
||||
self.bmp_nomask = wxBitmap('bitmaps/test_image.png', wxBITMAP_TYPE_PNG)
|
||||
self.bmp_nomask = images.getTestStar2Bitmap()
|
||||
|
||||
# One that we will
|
||||
self.bmp_withmask = wxBitmap('bitmaps/test_image.png', wxBITMAP_TYPE_PNG)
|
||||
self.bmp_withmask = images.getTestStar2Bitmap()
|
||||
|
||||
# this mask comes from a monochrome bitmap
|
||||
self.bmp_themask = wxBitmap('bitmaps/test_mask.bmp', wxBITMAP_TYPE_BMP)
|
||||
self.bmp_themask = images.getTestMaskBitmap()
|
||||
self.bmp_themask.SetDepth(1)
|
||||
mask = wxMask(self.bmp_themask)
|
||||
|
||||
@@ -47,7 +49,7 @@ class TestMaskWindow(wxScrolledWindow):
|
||||
|
||||
# Now we'll create a mask in a bit of an easier way, by picking a
|
||||
# colour in the image that is to be the transparent colour.
|
||||
self.bmp_withcolourmask = wxBitmap('bitmaps/test_image.png', wxBITMAP_TYPE_PNG)
|
||||
self.bmp_withcolourmask = images.getTestStar2Bitmap()
|
||||
mask = wxMaskColour(self.bmp_withcolourmask, wxWHITE)
|
||||
self.bmp_withcolourmask.SetMask(mask)
|
||||
|
||||
|
@@ -2,6 +2,8 @@
|
||||
from wxPython.wx import *
|
||||
from wxPython.ogl import *
|
||||
|
||||
import images
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# This creates some pens and brushes that the OGL library uses.
|
||||
|
||||
@@ -49,7 +51,6 @@ class MyEvtHandler(wxShapeEvtHandler):
|
||||
self.log = log
|
||||
self.statbarFrame = frame
|
||||
|
||||
|
||||
def UpdateStatusBar(self, shape):
|
||||
x,y = shape.GetX(), shape.GetY()
|
||||
width, height = shape.GetBoundingBoxMax()
|
||||
@@ -126,6 +127,7 @@ class TestWindow(wxShapeCanvas):
|
||||
self.SetDiagram(self.diagram)
|
||||
self.diagram.SetCanvas(self)
|
||||
self.shapes = []
|
||||
self.save_gdi = []
|
||||
|
||||
rRectBrush = wxBrush(wxNamedColour("MEDIUM TURQUOISE"), wxSOLID)
|
||||
|
||||
@@ -134,6 +136,14 @@ class TestWindow(wxShapeCanvas):
|
||||
self.MyAddShape(DiamondShape(90, 90), 345, 235, wxPen(wxBLUE, 3, wxDOT), wxRED_BRUSH, "Polygon")
|
||||
self.MyAddShape(RoundedRectangleShape(95,70), 140, 255, wxPen(wxRED, 1), rRectBrush, "Rounded Rect")
|
||||
|
||||
bmp = images.getTest2Bitmap()
|
||||
mask = wxMaskColour(bmp, wxBLUE)
|
||||
bmp.SetMask(mask)
|
||||
|
||||
s = wxBitmapShape()
|
||||
s.SetBitmap(bmp)
|
||||
self.MyAddShape(s, 225, 150, None, None, "Bitmap")
|
||||
|
||||
dc = wxClientDC(self)
|
||||
self.PrepareDC(dc)
|
||||
for x in range(len(self.shapes)):
|
||||
@@ -158,13 +168,13 @@ class TestWindow(wxShapeCanvas):
|
||||
|
||||
|
||||
def MyAddShape(self, shape, x, y, pen, brush, text):
|
||||
shape.SetDraggable(true)
|
||||
shape.SetDraggable(true, true)
|
||||
shape.SetCanvas(self)
|
||||
shape.SetX(x)
|
||||
shape.SetY(y)
|
||||
shape.SetPen(pen)
|
||||
shape.SetBrush(brush)
|
||||
shape.AddText(text)
|
||||
if pen: shape.SetPen(pen)
|
||||
if brush: shape.SetBrush(brush)
|
||||
if text: shape.AddText(text)
|
||||
#shape.SetShadowMode(SHADOW_RIGHT)
|
||||
self.diagram.AddShape(shape)
|
||||
shape.Show(true)
|
||||
@@ -177,6 +187,7 @@ class TestWindow(wxShapeCanvas):
|
||||
self.shapes.append(shape)
|
||||
|
||||
|
||||
|
||||
def __del__(self):
|
||||
for shape in self.diagram.GetShapeList():
|
||||
if shape.GetParent() == None:
|
||||
|
@@ -15,7 +15,7 @@ class TestSashWindow(wxPanel):
|
||||
|
||||
self.log = log
|
||||
|
||||
# will accupy the space not uised by the Layout Algorithm
|
||||
# will occupy the space not used by the Layout Algorithm
|
||||
self.remainingSpace = wxPanel(self, -1, style=wxSUNKEN_BORDER)
|
||||
|
||||
EVT_SASH_DRAGGED_RANGE(self, self.ID_WINDOW_TOP,
|
||||
|
@@ -1,6 +1,8 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
|
||||
import images
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class MyCanvas(wxScrolledWindow):
|
||||
@@ -20,7 +22,7 @@ class MyCanvas(wxScrolledWindow):
|
||||
|
||||
|
||||
self.SetCursor(wxStockCursor(wxCURSOR_PENCIL))
|
||||
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
||||
bmp = images.getTest2Bitmap()
|
||||
mask = wxMaskColour(bmp, wxBLUE)
|
||||
bmp.SetMask(mask)
|
||||
self.bmp = bmp
|
||||
@@ -42,16 +44,14 @@ class MyCanvas(wxScrolledWindow):
|
||||
|
||||
def DoDrawing(self, dc):
|
||||
dc.BeginDrawing()
|
||||
pen1 = wxPen(wxNamedColour('RED'))
|
||||
dc.SetPen(pen1)
|
||||
dc.SetPen(wxPen(wxNamedColour('RED')))
|
||||
dc.DrawRectangle(5, 5, 50, 50)
|
||||
|
||||
dc.SetBrush(wxLIGHT_GREY_BRUSH)
|
||||
dc.SetPen(wxPen(wxNamedColour('BLUE'), 4))
|
||||
dc.DrawRectangle(15, 15, 50, 50)
|
||||
|
||||
font = wxFont(14, wxSWISS, wxNORMAL, wxNORMAL)
|
||||
dc.SetFont(font)
|
||||
dc.SetFont(wxFont(14, wxSWISS, wxNORMAL, wxNORMAL))
|
||||
dc.SetTextForeground(wxColour(0xFF, 0x20, 0xFF))
|
||||
te = dc.GetTextExtent("Hello World")
|
||||
dc.DrawText("Hello World", 60, 65)
|
||||
@@ -81,12 +81,9 @@ class MyCanvas(wxScrolledWindow):
|
||||
dc.DrawRectangle(50,500,50,50)
|
||||
dc.DrawRectangle(100,500,50,50)
|
||||
|
||||
dc.SetPen(pen1)
|
||||
dc.SetPen(wxPen(wxNamedColour('RED')))
|
||||
dc.DrawEllipticArc(200, 500, 50, 75, 0, 90)
|
||||
|
||||
#from wxPython import dch
|
||||
#dch.FillRect(dc, wxRect(50, 400, 50, 50), wxBLACK)
|
||||
|
||||
self.DrawSavedLines(dc)
|
||||
dc.EndDrawing()
|
||||
|
||||
@@ -130,6 +127,27 @@ class MyCanvas(wxScrolledWindow):
|
||||
self.curLine = []
|
||||
self.ReleaseMouse()
|
||||
|
||||
|
||||
## This is an example of what to do for the EVT_MOUSEWHEEL event,
|
||||
## but since wxScrolledWindow does this already it's not
|
||||
## necessary to do it ourselves.
|
||||
|
||||
## wheelScroll = 0
|
||||
## def OnWheel(self, evt):
|
||||
## delta = evt.GetWheelDelta()
|
||||
## rot = evt.GetWheelRotation()
|
||||
## linesPer = evt.GetLinesPerAction()
|
||||
## ws = self.wheelScroll
|
||||
## ws = ws + rot
|
||||
## lines = ws / delta
|
||||
## ws = ws - lines * delta
|
||||
## self.wheelScroll = ws
|
||||
## if lines != 0:
|
||||
## lines = lines * linesPer
|
||||
## vsx, vsy = self.GetViewStart()
|
||||
## scrollTo = vsy - lines
|
||||
## self.Scroll(-1, scrollTo)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
|
@@ -2,6 +2,7 @@
|
||||
from wxPython.wx import *
|
||||
|
||||
import string
|
||||
import images
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
@@ -13,11 +14,17 @@ class TestPanel(wxPanel):
|
||||
|
||||
wxStaticText(self, -1, "This is a wxStaticBitmap.", wxPoint(45, 15))
|
||||
|
||||
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
||||
bmp = images.getTest2Bitmap()
|
||||
mask = wxMaskColour(bmp, wxBLUE)
|
||||
bmp.SetMask(mask)
|
||||
wxStaticBitmap(self, -1, bmp, wxPoint(80, 50),
|
||||
wxSize(bmp.GetWidth(), bmp.GetHeight()))
|
||||
|
||||
bmp = images.getRobinBitmap()
|
||||
wxStaticBitmap(self, -1, bmp, (80, 150))
|
||||
|
||||
wxStaticText(self, -1, "Hey, if Ousterhout can do it, so can I.",
|
||||
(200, 175))
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
@@ -96,8 +96,19 @@ class MySTC(wxStyledTextCtrl):
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
_USE_PANEL = 1
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
ed = MySTC(nb, -1, log)
|
||||
if not _USE_PANEL:
|
||||
ed = p = MySTC(nb, -1, log)
|
||||
|
||||
else:
|
||||
p = wxPanel(nb, -1)
|
||||
ed = MySTC(p, -1, log)
|
||||
s = wxBoxSizer(wxHORIZONTAL)
|
||||
s.Add(ed, 1, wxEXPAND)
|
||||
p.SetSizer(s)
|
||||
p.SetAutoLayout(true)
|
||||
|
||||
ed.SetText(demoText)
|
||||
ed.EmptyUndoBuffer()
|
||||
@@ -158,7 +169,7 @@ def runTest(frame, nb, log):
|
||||
ed.SetStyling(10, wxSTC_INDIC2_MASK | wxSTC_INDIC1_MASK)
|
||||
|
||||
|
||||
return ed
|
||||
return p
|
||||
|
||||
|
||||
|
||||
|
@@ -12,7 +12,7 @@ demoText = """\
|
||||
|
||||
|
||||
"""
|
||||
|
||||
wxSTC_CMD_ZOOMIN
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ class PythonSTC(wxStyledTextCtrl):
|
||||
def __init__(self, parent, ID):
|
||||
wxStyledTextCtrl.__init__(self, parent, ID)
|
||||
|
||||
self.CmdKeyAssign(ord('B'), wxSTC_SCMOD_CTRL, wxSTC_CMD_ZOOMIN)
|
||||
self.CmdKeyAssign(ord('N'), wxSTC_SCMOD_CTRL, wxSTC_CMD_ZOOMOUT)
|
||||
|
||||
self.SetLexer(wxSTC_LEX_PYTHON)
|
||||
self.SetKeyWords(0, string.join(keyword.kwlist))
|
||||
|
||||
@@ -262,18 +265,29 @@ class PythonSTC(wxStyledTextCtrl):
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
_USE_PANEL = 1
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
ed = PythonSTC(nb, -1)
|
||||
if not _USE_PANEL:
|
||||
ed = p = PythonSTC(nb, -1)
|
||||
else:
|
||||
p = wxPanel(nb, -1)
|
||||
ed = PythonSTC(p, -1)
|
||||
s = wxBoxSizer(wxHORIZONTAL)
|
||||
s.Add(ed, 1, wxEXPAND)
|
||||
p.SetSizer(s)
|
||||
p.SetAutoLayout(true)
|
||||
|
||||
|
||||
ed.SetText(demoText + open('Main.py').read())
|
||||
ed.EmptyUndoBuffer()
|
||||
|
||||
ed.Colourise(0, -1)
|
||||
|
||||
# line numbers in the margin
|
||||
ed.SetMarginType(1, wxSTC_MARGIN_NUMBER)
|
||||
ed.SetMarginWidth(1, 25)
|
||||
|
||||
return ed
|
||||
return p
|
||||
|
||||
|
||||
|
||||
|
@@ -26,25 +26,5 @@ def runTest(frame, nb, log):
|
||||
|
||||
|
||||
overview = """\
|
||||
This class represents a dialog that requests a one-line text string from the user. It is implemented as a generic wxWindows dialog.
|
||||
|
||||
wxTextEntryDialog()
|
||||
----------------------------------
|
||||
|
||||
wxTextEntryDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Please enter text", const wxString& defaultValue = "", long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition)
|
||||
|
||||
Constructor. Use wxTextEntryDialog::ShowModal to show the dialog.
|
||||
|
||||
Parameters
|
||||
-------------------
|
||||
|
||||
parent = Parent window.
|
||||
|
||||
message = Message to show on the dialog.
|
||||
|
||||
defaultValue = The default value, which may be the empty string.
|
||||
|
||||
style = A dialog style, specifying the buttons (wxOK, wxCANCEL) and an optional wxCENTRE style.
|
||||
|
||||
pos = Dialog position.
|
||||
"""
|
||||
|
36
wxPython/demo/wxToggleButton.py
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class TestPanel(wxPanel):
|
||||
def __init__(self, parent, log):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
self.log = log
|
||||
panel = wxPanel(self, -1)
|
||||
buttons = wxBoxSizer(wxHORIZONTAL)
|
||||
for word in string.split("These are toggle buttons"):
|
||||
b = wxToggleButton(panel, -1, word)
|
||||
EVT_TOGGLEBUTTON(self, b.GetId(), self.OnToggle)
|
||||
buttons.Add(b, flag=wxALL, border=5)
|
||||
|
||||
panel.SetAutoLayout(true)
|
||||
panel.SetSizer(buttons)
|
||||
buttons.Fit(panel)
|
||||
panel.Move((50,50))
|
||||
|
||||
def OnToggle(self, evt):
|
||||
self.log.write("Button %d toggled\n" % evt.GetId())
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
overview = """\
|
||||
"""
|
@@ -1,6 +1,8 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
|
||||
import images
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class TestToolBar(wxFrame):
|
||||
@@ -13,38 +15,37 @@ class TestToolBar(wxFrame):
|
||||
|
||||
wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE"))
|
||||
|
||||
tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER) #|wxTB_FLAT)
|
||||
tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER|wxTB_FLAT)
|
||||
#tb = wxToolBarSimple(self, -1, wxDefaultPosition, wxDefaultSize,
|
||||
# wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT)
|
||||
#self.SetToolBar(tb)
|
||||
|
||||
self.CreateStatusBar()
|
||||
|
||||
tb.AddSimpleTool(10, wxBitmap('bitmaps/new.bmp', wxBITMAP_TYPE_BMP),
|
||||
"New", "Long help for 'New'")
|
||||
tb.AddSimpleTool(10, images.getNewBitmap(), "New", "Long help for 'New'")
|
||||
EVT_TOOL(self, 10, self.OnToolClick)
|
||||
EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick)
|
||||
|
||||
tb.AddSimpleTool(20, wxBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP),
|
||||
"Open", "Long help for 'Open'")
|
||||
tb.AddSimpleTool(20, images.getOpenBitmap(), "Open", "Long help for 'Open'")
|
||||
EVT_TOOL(self, 20, self.OnToolClick)
|
||||
EVT_TOOL_RCLICKED(self, 20, self.OnToolRClick)
|
||||
|
||||
tb.AddSeparator()
|
||||
tb.AddSimpleTool(30, wxBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP),
|
||||
"Copy", "Long help for 'Copy'")
|
||||
tb.AddSimpleTool(30, images.getCopyBitmap(), "Copy", "Long help for 'Copy'")
|
||||
EVT_TOOL(self, 30, self.OnToolClick)
|
||||
EVT_TOOL_RCLICKED(self, 30, self.OnToolRClick)
|
||||
|
||||
tb.AddSimpleTool(40, wxBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP),
|
||||
"Paste", "Long help for 'Paste'")
|
||||
tb.AddSimpleTool(40, images.getPasteBitmap(), "Paste", "Long help for 'Paste'")
|
||||
EVT_TOOL(self, 40, self.OnToolClick)
|
||||
EVT_TOOL_RCLICKED(self, 40, self.OnToolRClick)
|
||||
|
||||
tb.AddSeparator()
|
||||
|
||||
tool = tb.AddTool(50, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
|
||||
tool = tb.AddTool(50, images.getTog1Bitmap(),
|
||||
shortHelpString="Toggle this", isToggle=true)
|
||||
EVT_TOOL(self, 50, self.OnToolClick)
|
||||
|
||||
tb.AddTool(60, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
|
||||
wxBitmap('bitmaps/tog2.bmp', wxBITMAP_TYPE_BMP),
|
||||
tb.AddTool(60, images.getTog1Bitmap(), images.getTog2Bitmap(),
|
||||
shortHelpString="Toggle with 2 bitmaps", isToggle=true)
|
||||
EVT_TOOL(self, 60, self.OnToolClick)
|
||||
|
||||
@@ -74,6 +75,8 @@ class TestToolBar(wxFrame):
|
||||
self.log.WriteText('OnToolEnter: %s, %s\n' % (event.GetId(), event.GetInt()))
|
||||
if self.timer is None:
|
||||
self.timer = wxTimer(self)
|
||||
if self.timer.IsRunning():
|
||||
self.timer.Stop()
|
||||
self.timer.Start(2000)
|
||||
event.Skip()
|
||||
|
||||
|
@@ -6,13 +6,14 @@ import string
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class MyTreeCtrl(wxTreeCtrl):
|
||||
def __init__(self, parent, id, pos, size, style):
|
||||
def __init__(self, parent, id, pos, size, style, log):
|
||||
wxTreeCtrl.__init__(self, parent, id, pos, size, style)
|
||||
|
||||
self.log = log
|
||||
|
||||
def OnCompareItems(self, item1, item2):
|
||||
t1 = self.GetItemText(item1)
|
||||
t2 = self.GetItemText(item2)
|
||||
self.log.WriteText('compare: ' + t1 + '<>' + t2 + '\n')
|
||||
if t1 < t2: return -1
|
||||
if t1 == t2: return 0
|
||||
return 1
|
||||
@@ -29,14 +30,16 @@ class TestTreeCtrlPanel(wxPanel):
|
||||
tID = NewId()
|
||||
|
||||
self.tree = MyTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
|
||||
wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)# | wxTR_MULTIPLE)
|
||||
wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS# | wxTR_MULTIPLE
|
||||
, self.log)
|
||||
|
||||
#import images
|
||||
#il = wxImageList(16, 16)
|
||||
#idx1 = il.Add(wxBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP))
|
||||
#idx2 = il.Add(wxBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP))
|
||||
#idx3 = il.Add(wxBitmap('bitmaps/new.bmp', wxBITMAP_TYPE_BMP))
|
||||
#idx4 = il.Add(wxBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP))
|
||||
#idx5 = il.Add(wxBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP))
|
||||
#idx1 = il.Add(images.getSmilesBitmap())
|
||||
#idx2 = il.Add(images.getOpenBitmap())
|
||||
#idx3 = il.Add(images.getNewBitmap())
|
||||
#idx4 = il.Add(images.getCopyBitmap())
|
||||
#idx5 = il.Add(images.getPasteBitmap())
|
||||
|
||||
#self.tree.SetImageList(il)
|
||||
#self.il = il
|
||||
|
261
wxPython/distrib/make_installer.py
Normal file
@@ -0,0 +1,261 @@
|
||||
"""
|
||||
This script will generate a setup script for InnoSetup and then run it
|
||||
to make the installer executable. If all goes right the proper versions
|
||||
of Python and wxWindows (including hybrid/final settings) will all be
|
||||
calculated based on what wxc.pyd imports and an appropriate installer
|
||||
will be created.
|
||||
"""
|
||||
|
||||
|
||||
import os, string
|
||||
|
||||
KEEP_TEMPS = 0
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
ISS_Template = r'''
|
||||
;;------------------------------------------------------------
|
||||
|
||||
[Setup]
|
||||
AppName = wxPython
|
||||
AppVerName = wxPython %(VERSION)s
|
||||
OutputBaseFilename = wxPython-%(VERSION)s-%(PYVER)s
|
||||
AppCopyright = Copyright <20> 2001 Total Control Software
|
||||
DefaultDirName = {code:GetPythonDir|c:\DoNotInstallHere}
|
||||
DefaultGroupName = wxPython %(SHORTVER)s for Python %(PYTHONVER)s
|
||||
AlwaysCreateUninstallIcon = yes
|
||||
|
||||
;; SourceDir = .
|
||||
;; OutputDir is relative to SourceDir
|
||||
OutputDir = dist
|
||||
WizardStyle = modern
|
||||
UninstallStyle = modern
|
||||
DisableStartupPrompt = true
|
||||
CompressLevel = 9
|
||||
DirExistsWarning = no
|
||||
DisableReadyMemo = true
|
||||
DisableReadyPage = true
|
||||
;;DisableDirPage = true
|
||||
DisableProgramGroupPage = true
|
||||
DisableAppendDir = true
|
||||
|
||||
UninstallFilesDir = {app}\wxPython
|
||||
AppPublisherURL = http://wxPython.org/
|
||||
LicenseFile = licence\licence.txt
|
||||
CodeFile = %(IFSFILE)s
|
||||
|
||||
;;------------------------------------------------------------
|
||||
|
||||
;;[Dirs]
|
||||
;;Name: "{app}\"
|
||||
|
||||
;;------------------------------------------------------------
|
||||
|
||||
[Components]
|
||||
Name: core; Description: "wxPython modules and library"; Types: full compact custom; Flags: fixed
|
||||
Name: docs; Description: "Documentation"; Types: full
|
||||
Name: demo; Description: "Demo application"; Types: full
|
||||
Name: samples; Description: "Sample applications"; Types: full
|
||||
Name: tools; Description: "Tools"; Types: full
|
||||
|
||||
|
||||
;;------------------------------------------------------------
|
||||
|
||||
[Files]
|
||||
Source: "%(SYSDIR)s\MSVCRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Components: core
|
||||
Source: "%(SYSDIR)s\MSVCIRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Components: core
|
||||
|
||||
Source: "%(WXDIR)s\lib\%(WXDLL)s"; DestDir: "{app}\wxPython"; Components: core
|
||||
Source: "wxPython\wxc.pyd"; DestDir: "{app}\wxPython"; Components: core
|
||||
Source: "wxPython\gridc.pyd"; DestDir: "{app}\wxPython"; Components: core
|
||||
Source: "wxPython\htmlc.pyd"; DestDir: "{app}\wxPython"; Components: core
|
||||
Source: "wxPython\utilsc.pyd"; DestDir: "{app}\wxPython"; Components: core
|
||||
Source: "wxPython\calendarc.pyd"; DestDir: "{app}\wxPython"; Components: core
|
||||
Source: "wxPython\glcanvasc.pyd"; DestDir: "{app}\wxPython"; Components: core
|
||||
Source: "wxPython\oglc.pyd"; DestDir: "{app}\wxPython"; Components: core
|
||||
Source: "wxPython\stc_c.pyd"; DestDir: "{app}\wxPython"; Components: core
|
||||
|
||||
Source: "wxPython\*.py"; DestDir: "{app}\wxPython"; Components: core
|
||||
Source: "wxPython\lib\*.py"; DestDir: "{app}\wxPython\lib"; Components: core
|
||||
Source: "wxPython\lib\editor\*.py"; DestDir: "{app}\wxPython\lib\editor"; Components: core
|
||||
Source: "wxPython\lib\editor\*.txt"; DestDir: "{app}\wxPython\lib\editor"; Components: core
|
||||
|
||||
Source: "demo\*.py"; DestDir: "{app}\wxPython\demo"; Components: demo
|
||||
Source: "demo\*.xml"; DestDir: "{app}\wxPython\demo"; Components: demo
|
||||
Source: "demo\*.txt"; DestDir: "{app}\wxPython\demo"; Components: demo
|
||||
|
||||
Source: "demo\bitmaps\*.gif"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
|
||||
Source: "demo\bitmaps\*.bmp"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
|
||||
Source: "demo\bitmaps\*.jpg"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
|
||||
Source: "demo\bitmaps\*.png"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
|
||||
Source: "demo\bitmaps\*.ico"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
|
||||
|
||||
Source: "demo\data\*.htm"; DestDir: "{app}\wxPython\demo\data"; Components: demo
|
||||
Source: "demo\data\*.html"; DestDir: "{app}\wxPython\demo\data"; Components: demo
|
||||
Source: "demo\data\*.py"; DestDir: "{app}\wxPython\demo\data"; Components: demo
|
||||
Source: "demo\data\*.png"; DestDir: "{app}\wxPython\demo\data"; Components: demo
|
||||
Source: "demo\data\*.bmp"; DestDir: "{app}\wxPython\demo\data"; Components: demo
|
||||
Source: "demo\data\*.i"; DestDir: "{app}\wxPython\demo\data"; Components: demo
|
||||
Source: "demo\data\*.h"; DestDir: "{app}\wxPython\demo\data"; Components: demo
|
||||
Source: "demo\data\*.txt"; DestDir: "{app}\wxPython\demo\data"; Components: demo
|
||||
|
||||
Source: "README.txt"; DestDir: "{app}\wxPython\docs"; Flags: isreadme; Components: core
|
||||
Source: "CHANGES.txt"; DestDir: "{app}\wxPython\docs"; Components: core
|
||||
Source: "licence\*.txt"; DestDir: "{app}\wxPython\docs\licence"; Components: core
|
||||
Source: "%(WXDIR)s\docs\htmlhelp\wx.chm"; DestDir: "{app}\wxPython\docs"; Components: docs
|
||||
Source: "%(WXDIR)s\docs\htmlhelp\ogl.chm"; DestDir: "{app}\wxPython\docs"; Components: docs
|
||||
|
||||
Source: "tools\*.py"; DestDir: "{app}\wxPython\tools"; Components: tools
|
||||
|
||||
Source: "samples\doodle\*.py"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
|
||||
Source: "samples\doodle\*.txt"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
|
||||
Source: "samples\doodle\sample.ddl"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
|
||||
Source: "samples\doodle\superdoodle.iss"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
|
||||
Source: "samples\wxProject\*.txt"; DestDir: "{app}\wxPython\samples\wxProject"; Components: samples
|
||||
Source: "samples\wxProject\*.py"; DestDir: "{app}\wxPython\samples\wxProject"; Components: samples
|
||||
|
||||
Source: "samples\stxview\*.py"; DestDir: "{app}\wxPython\samples\stxview"; Components: samples
|
||||
Source: "samples\stxview\*.stx"; DestDir: "{app}\wxPython\samples\stxview"; Components: samples
|
||||
Source: "samples\stxview\*.txt"; DestDir: "{app}\wxPython\samples\stxview"; Components: samples
|
||||
Source: "samples\stxview\StructuredText\*.py"; DestDir: "{app}\wxPython\samples\stxview\StructuredText"; Components: samples
|
||||
|
||||
|
||||
;;------------------------------------------------------------
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\Run the DEMO"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "{app}\wxPython\demo"; Parameters: "demo.py";
|
||||
Name: "{group}\wxWindows Referece"; Filename: "{app}\wxPython\docs\wx.chm";
|
||||
Name: "{group}\wxOGL Referece"; Filename: "{app}\wxPython\docs\ogl.chm";
|
||||
Name: "{group}\licence.txt"; Filename: "{app}\wxPython\docs\licence\licence.txt";
|
||||
Name: "{group}\README.txt"; Filename: "{app}\wxPython\docs\README.txt";
|
||||
Name: "{group}\CHANGES.txt"; Filename: "{app}\wxPython\docs\CHANGES.txt";
|
||||
Name: "{group}\Sample Apps"; Filename: "{app}\wxPython\samples"; Components: samples
|
||||
|
||||
;;Name: "{group}\Uninstall wxPython"; Filename: "{app}\wxPython\unins000.exe"; WorkingDir: "{app}\wxPython";
|
||||
|
||||
|
||||
;;------------------------------------------------------------
|
||||
|
||||
[UninstallDelete]
|
||||
Type: files; Name: "{app}\wxPython\*.pyc";
|
||||
Type: files; Name: "{app}\wxPython\*.pyo";
|
||||
Type: files; Name: "{app}\wxPython\lib\*.pyc";
|
||||
Type: files; Name: "{app}\wxPython\lib\*.pyo";
|
||||
Type: files; Name: "{app}\wxPython\lib\editor\*.pyc";
|
||||
Type: files; Name: "{app}\wxPython\lib\editor\*.pyo";
|
||||
Type: files; Name: "{app}\wxPython\demo\*.pyc";
|
||||
Type: files; Name: "{app}\wxPython\demo\*.pyo";
|
||||
Type: files; Name: "{app}\wxPython\demo\data\showTips";
|
||||
Type: files; Name: "{app}\wxPython\tools\*.pyc";
|
||||
Type: files; Name: "{app}\wxPython\tools\*.pyo";
|
||||
Type: files; Name: "{app}\wxPython\samples\doodle\*.pyc";
|
||||
Type: files; Name: "{app}\wxPython\samples\doodle\*.pyo";
|
||||
Type: files; Name: "{app}\wxPython\samples\wxProject\*.pyc";
|
||||
Type: files; Name: "{app}\wxPython\samples\wxProject\*.pyo";
|
||||
Type: files; Name: "{app}\wxPython\samples\stxview\*.pyc";
|
||||
Type: files; Name: "{app}\wxPython\samples\stxview\*.pyo";
|
||||
Type: files; Name: "{app}\wxPython\samples\stxview\StructuredText\*.pyc";
|
||||
Type: files; Name: "{app}\wxPython\samples\stxview\StructuredText\*.pyo";
|
||||
|
||||
'''
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
IFS_Template = r"""
|
||||
program Setup;
|
||||
var
|
||||
PythonDir : String;
|
||||
|
||||
function InitializeSetup(): Boolean;
|
||||
begin
|
||||
if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
|
||||
'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
|
||||
'', PythonDir) then begin
|
||||
MsgBox('No installation of Python %(PYTHONVER)s found. Aborting...',
|
||||
mbConfirmation, MB_OK);
|
||||
Result := false;
|
||||
end else
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
|
||||
function GetPythonDir(Default: String): String;
|
||||
begin
|
||||
Result := PythonDir;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def find_DLLs():
|
||||
|
||||
WXDLL = PYTHONVER = None
|
||||
|
||||
proc = os.popen(r"dumpbin /imports wxPython\wxc.pyd", "r")
|
||||
lines = proc.readlines()
|
||||
proc.close()
|
||||
for line in lines:
|
||||
if line[:6] == " wx":
|
||||
WXDLL = string.strip(line)
|
||||
|
||||
if line[:10] == " python":
|
||||
PYTHONVER = line[10] + '.' + line[11]
|
||||
|
||||
if WXDLL and PYTHONVER:
|
||||
return WXDLL, PYTHONVER
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def main():
|
||||
|
||||
verglob = {}
|
||||
execfile("wxPython/__version__.py", verglob)
|
||||
|
||||
VERSION = verglob["ver"]
|
||||
SHORTVER = VERSION[:3]
|
||||
|
||||
WXDLL, PYTHONVER = find_DLLs()
|
||||
|
||||
PYVER = "Py" + PYTHONVER[0] + PYTHONVER[2]
|
||||
WXDIR = os.environ["WXWIN"]
|
||||
WXPYDIR = os.path.join(WXDIR, "wxPython")
|
||||
SYSDIR = r"C:\WINNT\SYSTEM32"
|
||||
ISSFILE = "__wxPython.iss"
|
||||
IFSFILE = "__wxPython.ifs"
|
||||
|
||||
|
||||
if string.find(WXDLL, "h") != -1:
|
||||
PYVER = PYVER + "-hybrid"
|
||||
|
||||
f = open(ISSFILE, "w")
|
||||
f.write(ISS_Template % vars())
|
||||
f.close()
|
||||
|
||||
f = open(IFSFILE, "w")
|
||||
f.write(IFS_Template % vars())
|
||||
f.close()
|
||||
|
||||
os.system(r"C:\TOOLS\InnoSetup2Ex\ISCC.exe %s" % ISSFILE)
|
||||
|
||||
if not KEEP_TEMPS:
|
||||
os.remove(ISSFILE)
|
||||
os.remove(IFSFILE)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
@@ -15,6 +15,7 @@ mkdir _distrib_tgz
|
||||
mkdir _distrib_tgz/wxPython-$1
|
||||
|
||||
cp -R demo _distrib_tgz/wxPython-$1
|
||||
cp -R samples _distrib_tgz/wxPython-$1
|
||||
|
||||
# do some cleanup
|
||||
rm -rf `find _distrib_tgz/wxPython-$1 -name CVS`
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Document Type: WSE
|
||||
item: Global
|
||||
Version=6.01
|
||||
Title=wxPython 2.3 Installation
|
||||
Title=wxPython 2.2 Installation
|
||||
Flags=10010111
|
||||
Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
Japanese Font Name=MS Gothic
|
||||
@@ -17,7 +17,7 @@ item: Global
|
||||
Patch Flags=0000000000001001
|
||||
Patch Threshold=85
|
||||
Patch Memory=4000
|
||||
EXE Filename=wxPython-2.3b1.exe
|
||||
EXE Filename=wxPython-2.2.5-PyXX.exe
|
||||
FTP Cluster Size=20
|
||||
Per-User Version ID=1
|
||||
Dialogs Version=6
|
||||
@@ -55,12 +55,12 @@ item: End Block
|
||||
end
|
||||
item: Set Variable
|
||||
Variable=APPTITLE
|
||||
Value=wxPython 2.3
|
||||
Value=wxPython 2.2
|
||||
Flags=10000000
|
||||
end
|
||||
item: Set Variable
|
||||
Variable=GROUP
|
||||
Value=wxPython 2.3
|
||||
Value=wxPython 2.2
|
||||
Flags=10000000
|
||||
end
|
||||
item: Set Variable
|
||||
@@ -72,17 +72,17 @@ item: Set Variable
|
||||
Value=wxPython
|
||||
Flags=10000000
|
||||
end
|
||||
item: Check Configuration
|
||||
Flags=10111011
|
||||
end
|
||||
item: Remark
|
||||
end
|
||||
item: Set Variable
|
||||
Variable=PYTHONVER
|
||||
Value=2.0
|
||||
Value=1.5
|
||||
end
|
||||
item: Remark
|
||||
end
|
||||
item: Check Configuration
|
||||
Flags=10111011
|
||||
end
|
||||
item: Get Registry Key Value
|
||||
Variable=PYTHONDIR
|
||||
Key=SOFTWARE\Python\PythonCore\%PYTHONVER%\InstallPath
|
||||
@@ -814,8 +814,8 @@ item: Install File
|
||||
Flags=0000001010000011
|
||||
end
|
||||
item: Install File
|
||||
Source=c:\projects\wx\lib\wx23_0.dll
|
||||
Destination=%MAINDIR%\wxPython\wx23_0.dll
|
||||
Source=c:\projects\wx\lib\wx22_5.dll
|
||||
Destination=%MAINDIR%\wxPython\wx22_5.dll
|
||||
Flags=0000000010010010
|
||||
end
|
||||
item: Install File
|
||||
@@ -909,7 +909,7 @@ item: Install File
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: Install File
|
||||
Source=c:\Projects\wx\wxPython\demo\data\*.htm
|
||||
Source=c:\Projects\wx\wxPython\demo\data\*.html
|
||||
Destination=%MAINDIR%\wxPython\demo\data
|
||||
Description=Demos
|
||||
Flags=0000000010000010
|
||||
@@ -965,7 +965,7 @@ item: Install File
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: Install File
|
||||
Source=c:\PROJECTS\wx\docs\html\ogl\ogl.chm
|
||||
Source=c:\PROJECTS\wx\docs\htmlhelp\ogl.chm
|
||||
Destination=%MAINDIR%\wxPython\docs\ogl.chm
|
||||
Description=wxPython documentation
|
||||
Flags=0000000010000010
|
||||
|
4
wxPython/distrib/zipall.bat
Executable file
@@ -0,0 +1,4 @@
|
||||
|
||||
find . | grep -v "/CVS" | grep -v "./build/" | grep -v "./distrib/" | grep -v ".pyd" | grep -v ".pdb" | grep -v "contrib/ogl/contrib" | grep -v "contrib/stc/contrib" | zip -@ wxPython.zip
|
||||
|
||||
|