Compare commits

..

242 Commits

Author SHA1 Message Date
Bryan Petty
04e089170a This commit was manufactured by cvs2svn to create tag 'Py_0_9_1'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/Py_0_9_1@20447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-03 13:12:21 +00:00
Patrick K. O'Brien
8c090824f2 Tagged version.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-03 13:12:21 +00:00
Patrick K. O'Brien
5748250fd4 Get the real path.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-03 12:59:25 +00:00
Julian Smart
e0754b1233 APplied patch [ 731719 ] Owner draw font leak/overuse
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-03 11:58:18 +00:00
Patrick K. O'Brien
10fc146318 Updated documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-03 02:35:46 +00:00
Patrick K. O'Brien
643280d7bf Converted to reStructuredText.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-03 02:30:22 +00:00
Vadim Zeitlin
2c439fe7b6 compilation fix when WXUNUSED(arg) == arg
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-01 22:53:59 +00:00
Vadim Zeitlin
fb04fd266a better handling of transparent colour in wxImage conversion (patch 726208)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-01 20:12:36 +00:00
Vadim Zeitlin
859a5e3406 stddef.h required for IRIX compilation (patch 721388)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-01 19:47:16 +00:00
Vadim Zeitlin
8497a90d5c set the index for BEGIN_DRAG events (patch 726308)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-01 19:38:42 +00:00
Robin Dunn
bba6d4f731 typo fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-01 17:55:15 +00:00
Robin Dunn
d7116a786d Round up the virtual size to be a multiple of the scroll rate
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-01 17:54:05 +00:00
Julian Smart
ef1694d6f0 Typo fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-01 14:19:39 +00:00
Julian Smart
3ef4ba7fca Removed backslash in example
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-01 13:40:12 +00:00
Václav Slavík
a9c1f709af fixed Norwegian Bokmal code to conform to new ISO 639-2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 22:48:01 +00:00
Roman Rolinsky
12f07f17cf 0.1.1-2
-------

Bugs with currentEncoding and frame testing fixed.

Some required parameters are set to default if missing.

Unsupported classes are tolerated, with warning message.

wxScrolledWindow added (to 'control' pulldown menu, not yet to the
tool palette).

Multi-line editing for labels and some values (wxTextCtrl,
wxHtmlWindow).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 15:20:33 +00:00
Patrick K. O'Brien
fea1441f62 For Python 2.1 compatibility, replaced iteritems() with items().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 14:19:17 +00:00
Vadim Zeitlin
92f7a00667 fixed configure for autoconf 2.5x (patch from Olly Betts)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 13:31:09 +00:00
Julian Smart
8612f8167b Allow for +/- in the E part
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 12:41:14 +00:00
Julian Smart
98f8dcdab6 Allow 'e' or 'E' in numeric text.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 09:43:03 +00:00
Robin Dunn
b35d468f66 SWIGged updates for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 01:22:05 +00:00
Robin Dunn
45e2c6f716 SWIGged updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 01:15:45 +00:00
Robin Dunn
0a5f534430 SWIGged updates for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 01:13:31 +00:00
Robin Dunn
6fad3ddb82 Used glob to simplify some file lists
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 00:57:15 +00:00
Robin Dunn
c9cc9d67bc Typo fix, and a bit more info
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 00:56:41 +00:00
Robin Dunn
791ed2d3d1 When the __class__ of a dead object is replaced with _wxPyDeadObject
the __del__ of the original class is now called first.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 00:55:17 +00:00
Robin Dunn
a16bcfcef2 Shaped window support for wxMac, plus a wxSTAY_ON_TOP fix from Egon
<e_lub@yahoo.com>   wxMac requires knowledge before Create that SetShape
will be called so I also added the wxFRAME_SHAPED style flag.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-30 00:39:15 +00:00
Robin Dunn
e2a07240ee SF Patch #728691, dangling pointer fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-28 18:44:27 +00:00
Patrick K. O'Brien
ba82f67d6d Better sys.path handling, other minor tweaks.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-28 17:43:08 +00:00
Patrick K. O'Brien
ef48bdb011 Commented out print statement.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-28 17:11:49 +00:00
Patrick K. O'Brien
c5ae760f0c Removed old code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-28 17:05:52 +00:00
Patrick K. O'Brien
93701e2a00 Removed addition of current dir to sys.path.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-28 16:10:40 +00:00
Julian Smart
0e66b22778 Doc suggestions applied
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-28 10:37:08 +00:00
Julian Smart
146dd475ae Fixed [ 728819 ] memory leak in ipcbase.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-28 10:33:05 +00:00
Vadim Zeitlin
bf0793e2bb *really* fixed searching in sorted arrays
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-27 21:24:36 +00:00
Robert Roebling
e9e466c134 timer no longer returns IsRunning() after a
one shot timer has fired.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-27 21:18:17 +00:00
Patrick K. O'Brien
b80ff307a1 Moved to docs directory; some files renamed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-27 14:13:54 +00:00
Patrick K. O'Brien
e71a8700c4 New documentation directory.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-27 14:02:14 +00:00
Stefan Csomor
3728b81a27 backpatch for activate error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-26 20:32:05 +00:00
Stefan Csomor
146afc4d24 moving rollover check, was causing hangs upon termination in case ->top was 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-26 20:26:13 +00:00
Vadim Zeitlin
e275abbd9b fixed bug recently introduced in wxSortedArray::Index()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-25 11:50:56 +00:00
Robert Roebling
4115304e1f Another try to fix the enter/leave freeze while in capture.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-24 17:39:45 +00:00
Robin Dunn
85aa152733 Restore signal handlers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-23 21:31:41 +00:00
Robin Dunn
2402819570 Added wxPrintMode enum
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-23 21:29:57 +00:00
Robin Dunn
78e7a73d4f Changed validator parameter name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-23 21:29:36 +00:00
Robin Dunn
ffac66d530 Added some new test cases
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-23 21:26:15 +00:00
Robin Dunn
5dc5e70e20 Added masked edit controls (wxPython.lib.maskededit) by Jeff Childers
and Will Sadkin.  Updated wxTimeCtrl to use MaskedEdit.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-23 21:25:23 +00:00
Robin Dunn
376b7bd99e wxCHECK for valid menu in DoPopupMenu (SF Bug# 722230)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-23 21:11:32 +00:00
Robin Dunn
2695ce5a87 Prevent a Gtk-CRITICAL message when Remove()ing a menu from a menubar
that has submenus.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-23 21:08:42 +00:00
Robin Dunn
173b026f6c Fix setting the scrollbar positions (SF Bug #721159)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-23 21:04:26 +00:00
Robert Roebling
0f20644152 Typo in mouse event code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-23 06:37:05 +00:00
Ron Lee
004612c018 updated for 2.4.0.8 release.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 23:14:58 +00:00
Patrick K. O'Brien
b7726792a9 Remove autocomplete list size restriction.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 22:18:03 +00:00
Robin Dunn
5712d9371c SWIGged update for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 22:10:32 +00:00
Patrick K. O'Brien
af48798d9c Changed title.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 22:09:49 +00:00
Robin Dunn
448363cd84 SWIGged updates for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 22:07:13 +00:00
Patrick K. O'Brien
63ad6bbb1b Added panel with sizer to reduce flicker and allow other controls on
the panel later.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 21:57:18 +00:00
Robin Dunn
6f8b147bf6 SWIGged updats for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 20:30:56 +00:00
Robin Dunn
a58fefdcbb Updated Scintilla to 1.52
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 20:20:45 +00:00
Robin Dunn
94095266a7 Updated Scintilla to 1.52
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 19:56:54 +00:00
Patrick K. O'Brien
66765a238d Better scripting support.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 19:19:29 +00:00
Patrick K. O'Brien
a0dc39c565 Updates.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-19 01:06:32 +00:00
Robin Dunn
8cd6b6b985 Fixed INOUT parameter.
Removed wrappers for wxMenu::Attach/Detach since they are really only
for internal use and I didn't need them afterall to work around a bug that I
thought I was fighting with...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-18 21:33:55 +00:00
Robin Dunn
96de476467 Moved wx/examples to samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-18 21:17:46 +00:00
Robin Dunn
e8e8026ec7 Added AnalogClock class to library
Added NewNamespace sample to the demo
Other demo tweaks


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-18 21:10:28 +00:00
Patrick K. O'Brien
0776fe07e4 Removed shebangs to facilitate Debian packaging.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-18 19:30:36 +00:00
Vadim Zeitlin
09c5557e7a removed (duplicated) wxArrayPages
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-18 18:48:45 +00:00
Chris Elliott
e216a18080 fix typo in makefile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-18 16:28:59 +00:00
Vadim Zeitlin
e5503d67f9 removed wxCHOICEDLG_DIALOG_STYLE, use only wxCHOICEDLG_STYLE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-18 10:48:35 +00:00
Vadim Zeitlin
62acf6c87c make choice dialog resizeable by default
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-17 22:23:49 +00:00
Patrick K. O'Brien
f474f6a241 Fix refresh problem on Win98.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-17 21:42:54 +00:00
Robin Dunn
4a1a1d848d Ensure that submenus are also added to the system when their parent
menu is used in a wxMenuBar::Repalce call.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-17 20:06:17 +00:00
Patrick K. O'Brien
99a5137c2d Fix line endings for Win and Mac.
Separate compile and exec steps for better error handling.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-17 19:46:46 +00:00
Patrick K. O'Brien
6b0fd7830e Buffer display name on notebook tab hack fest. This should be
refactored and made a method of buffer, perhaps
buffer.getDisplayName().


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-17 18:48:35 +00:00
David Webster
1176373c57 Fix this buggy makefile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-17 17:38:33 +00:00
David Webster
c506b569a9 Catch up Os/2 to the state of the branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-17 17:24:45 +00:00
David Webster
6a6e183c12 for true and false
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-17 17:23:03 +00:00
Václav Slavík
f1ebf6088a fixed memory leak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 22:33:54 +00:00
Robin Dunn
cf83df6d61 Backported the controls on a toolbar fix for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 21:05:53 +00:00
Patrick K. O'Brien
08efbf69b1 One shell for each editor; good for testing namespace issues.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 17:25:44 +00:00
Patrick K. O'Brien
c678a73f7e Set focus to the shell.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 17:23:39 +00:00
Robin Dunn
ce60b8194a Some NewId() --> wxNewId() changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 15:05:19 +00:00
Julian Smart
a593039f68 Fixed memory leak when setting new wxMask for wxBitmap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 09:54:23 +00:00
Robin Dunn
464242f3d1 SWIGged updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 06:10:10 +00:00
Robin Dunn
141e492284 Added wxMenu Attach/Detach helpers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 06:09:47 +00:00
Robin Dunn
8b52d1be62 Start actually returns bool
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 06:08:59 +00:00
Robin Dunn
1e89000cc8 Add more info about Scintilla changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 06:07:55 +00:00
Robin Dunn
ce589e8291 Updated the Makefile.in and setup.py with all the new dirs for the wx
and py packages.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-16 06:06:27 +00:00
Patrick K. O'Brien
5cc33b058c Moved to editwindow.py.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-15 22:10:27 +00:00
Patrick K. O'Brien
64386c666c Major restructuring to get a better foundation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-15 22:03:03 +00:00
David Elliott
9d5aa5d876 When saving the editable state, use the real state (m_editable)
Same change as 1.53 -> 1.54


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-14 18:51:54 +00:00
Julian Smart
fad7abc046 Test for result of searching for wxID_CANCEL button
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-13 22:56:09 +00:00
Julian Smart
824d857df1 Set wxPendingEvents to NULL after deletion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-13 22:54:32 +00:00
Václav Slavík
a24ce8f811 backported wxFileName::MakeAbsolute
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-13 17:09:37 +00:00
Václav Slavík
919d1806cc removed outdated docs (fixes bug #698139)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-12 22:29:04 +00:00
Václav Slavík
89b6b3cccb applied patch to fix tooltips charset
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-12 18:40:48 +00:00
Robin Dunn
d00fe0d422 Fixed wxMac's wxTextCtrl::SetSelection so that (-1,-1) will select the
entire value like other ports do.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-11 22:38:56 +00:00
Vadim Zeitlin
7a7fb211dc return wxKILL_OK in krc instead of leaving it unchanged
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-11 22:32:44 +00:00
Vadim Zeitlin
fd4b068652 fixed bug with searching in sorted arrays
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-11 22:05:24 +00:00
Vadim Zeitlin
ae8b9dcc4a allow vetoing wxEVT_COMMAND_LIST_COL_BEGIN_DRAG (backported from HEAD)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-11 19:08:41 +00:00
Stefan Csomor
5c80bed5e7 cleanup and classic fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-11 17:45:06 +00:00
Robin Dunn
1b3864922c Added a sample to the demo specifically for PopupMenus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-11 17:12:07 +00:00
Robin Dunn
62e3042f36 Backported fix allowing for wxMac popup menus to have submenus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-11 17:10:57 +00:00
Robin Dunn
efe8d3eb34 Test a submenu on the popup menu
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-11 15:20:49 +00:00
Patrick K. O'Brien
5d054a19fd Fix column count.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 23:12:04 +00:00
Václav Slavík
83e991d00e don't use deprecated macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 23:01:42 +00:00
Robin Dunn
d268268837 SWIGged updates for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 21:58:06 +00:00
Robin Dunn
d8ac6a6267 SWIGged updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 21:58:03 +00:00
Robin Dunn
d6b4de54b5 SWIGged updates for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 21:57:22 +00:00
Robin Dunn
ba8161f46b Added __nonzero__ method to more classes that have a Ok or IsOk
method.  This allows code like "if obj: ..." to be the same as
"if obj.IsOk(): ..."


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 19:45:27 +00:00
Robin Dunn
59f89e9738 No need to have the old PyCrust in the new namespace
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 19:42:58 +00:00
Robin Dunn
88cd49f777 Added __nonzero__ method to more classes that have a Ok or IsOk
method.  This allows code like "if obj: ..." to be the same as
"if obj.Ok: ..."


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 19:38:11 +00:00
Robin Dunn
d2d844fa99 Test code for removing a submenu
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 19:35:39 +00:00
Robin Dunn
9b945ca87a SF patch [ 718899 ] wxGrid - output parameters
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 15:49:00 +00:00
Vadim Zeitlin
4140358663 add missing symbols to wxBase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 13:15:22 +00:00
Roman Rolinsky
22b3452638 - changed encoding selection, removed -i option
- replace command


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 09:31:39 +00:00
Gilles Depeyrot
8ed35e7493 if we are not in the main thread, output the assert directly and trap since
dialogs cannot be displayed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-10 06:13:48 +00:00
Robin Dunn
ea841e4340 SWIGged updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 19:44:44 +00:00
Robin Dunn
ed23e4b31b SWIGged updates for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 19:43:17 +00:00
Robin Dunn
5d5c8aa70e Regenerated the default script batch files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 19:43:05 +00:00
Robin Dunn
9e52ade763 Demo tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 19:41:48 +00:00
Robin Dunn
62107846d2 SWIGged updates for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 19:40:08 +00:00
Robin Dunn
2321b3c778 Added __nonzero__ method to wxTreeItemId.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 19:28:38 +00:00
Robin Dunn
6416289540 Updated demo for new Py packages, and updated the html-ized version of stc.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 19:14:15 +00:00
Robin Dunn
8245592fde wxHtmlWindow::LoadFile is now available, added wxNotebookPage helper class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 19:13:07 +00:00
Robin Dunn
c2a79c3e1c Removed the old tests that I havn't looked at or used for years
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 18:54:43 +00:00
Robin Dunn
5f933e58ef Patrick O'Brien's PyCrust package has been renamed to Py and now
includes several new tools.  As part of the change the location of the
pacakge has changed as well, it is now accessible as "from wxPython
import py" (or "from wx import py" using the new namespace.)  There
are still some transition moudules in the wxPython.lib.PyCrust mackage
that will issue a warning and then import what is needed from the new
package.  These will be removed in a future release.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 17:44:53 +00:00
Robin Dunn
81c9a1a8e7 Use a different window style to help ensure there are no window
decorations added


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 16:26:35 +00:00
Robin Dunn
4f10f2e0e1 SWIGged updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 16:24:53 +00:00
Robin Dunn
ab829dd986 Some updates for wxHtml classes, and other tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 16:23:30 +00:00
Robin Dunn
f50d205d88 Updated version number
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 16:04:18 +00:00
Václav Slavík
e19e065d15 forgot to add LoadFile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 16:02:31 +00:00
Robin Dunn
e231bca2ab More wxSTC tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 01:37:05 +00:00
Robin Dunn
fce40eebe3 MOre wxSTC tweaks and a buffer overflow fix too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 01:06:42 +00:00
Robin Dunn
058eaf8285 Fix VC6 compile errors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 00:02:28 +00:00
Robin Dunn
09aceb98d9 Demo tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-08 22:58:03 +00:00
Robin Dunn
9e94c29759 CHanged IconWidth from a constant to a function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-08 22:56:31 +00:00
Robin Dunn
e5088d14a2 Updated wxSTC to Scintilla 1.51
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-08 22:41:31 +00:00
Václav Slavík
a0bcb6934e backported GTK2 default font fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-08 22:28:30 +00:00
Robin Dunn
b28d567bb0 Turn off all border styles for the inner window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-08 22:24:14 +00:00
Václav Slavík
c44ad973b9 partially backported wxHTML SetFonts improvements
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-07 22:19:19 +00:00
Václav Slavík
3d20fa7032 XRC fixes for <object_ref> and relative file names
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-07 22:16:27 +00:00
Václav Slavík
dc5003c6f3 backported wxFileConfig fix for Unicode mode: always use utf-8
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-07 22:14:15 +00:00
Václav Slavík
0da58ad502 backported correct CDATA and <script> handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-07 22:11:53 +00:00
Václav Slavík
9d308583a4 more backported chnages
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-07 22:10:44 +00:00
Václav Slavík
9a345c9277 backported toolbar handler improvements
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-07 22:09:21 +00:00
David Elliott
9487b29313 Fix from HEAD 1.87 -> 1.88
After delete wxPendingEventsLocker;  wxPendingEventsLocker = NULL; so that
the wxEvent code doesn't try to use it while cleaning up.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-07 18:08:58 +00:00
Vadim Zeitlin
f8faaa532a fix bug with not accepting write-only formats in d&d (backported from head)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 19:43:26 +00:00
Julian Smart
094cb15ba0 It turns out there was a change to mimetype.h (addition of
parameters) so must revert the previous backport.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 19:09:15 +00:00
Julian Smart
e5490e6eb8 Add support for GTK2 label mnemonics
Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 17:55:52 +00:00
Julian Smart
91c04f6445 Improved X11 ShowFullScreen
Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 17:43:12 +00:00
Julian Smart
b5bc85ca42 Backported fix: use GNOME2's /usr/share/pixmaps/document-icons in wxMimeTypesManager
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 17:20:10 +00:00
Julian Smart
680011889d Fixes for compilation with OpenWatcom
Backport from head: most were already applied


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 17:17:05 +00:00
Julian Smart
af21489292 Backported wxrc fixes from head
1) fixed compilation of wxBitmap, wxIcon toplevel nodes
2) fixed wxrc when using -o dirname/filename


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 17:09:23 +00:00
Julian Smart
2d50f4b5f2 Applied [ 703260 ] wxFontEncoding Problem
Backported from trunk


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 16:53:16 +00:00
Julian Smart
466a7a71c7 Implement wxExecute with proper callback on Mac OS X
Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 16:47:48 +00:00
Julian Smart
5b7fd7d337 Implemented wxTextCtrl::Remove/Replace() for GTK2
Backport from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 16:38:28 +00:00
Julian Smart
0cf2523391 Applied patch [ 705441 ] Radio button consecutive groups bug
Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 16:33:52 +00:00
Julian Smart
2b3986f719 Alt-letter didn't switch focus to a spin ctrl following static control
with "&letter" accel
Backport from head for
http://sf.net/tracker/index.php?func=detail&aid=672974&group_id=9863&atid=109863


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 16:28:12 +00:00
Julian Smart
846173c976 Fix for bug whereby owner-drawn buttons didn't draw multiline labels correctly
Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 16:23:09 +00:00
Julian Smart
a5243c0dbe Accept '\r' as delimiter when parsing dates (bug #684617)
Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 15:39:39 +00:00
Julian Smart
bf9728b3d7 Fixed memory leak in generic wxFileDialog
Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 15:36:12 +00:00
Julian Smart
3fd1786b81 Fixed memory leak in wxMimeTypesManager
backport from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 15:30:54 +00:00
Julian Smart
2c7015513f Applied [ 668155 ] Refresh problem when msgbox is shown (wxUniversal)
Backport with modification from CVS head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 15:19:53 +00:00
Julian Smart
0733b715d6 Fix for wxProgressDialog::Update() signature
backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 15:15:37 +00:00
Julian Smart
c9cdb51104 Fixes for wxLocale::Init and Borland C++
Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 15:08:12 +00:00
Julian Smart
9e1c4c0ab4 Use ES_DISABLENOSCROLL to work around the vertical scrollbar bug in
wxTE_RICH2 text control
Backport from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 15:03:08 +00:00
Julian Smart
091adf6727 wxCondition doc update from head
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 14:52:13 +00:00
Julian Smart
410b0c776d wxFrame::Maximize(FALSE) would maximize the window if
called before showing it
Backport from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 14:45:30 +00:00
Julian Smart
b0b5189e03 wxStopWatch::Start() didn't resume it contrary to the docs
Backport from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 14:41:57 +00:00
Julian Smart
3b4b3d8550 Fix for deleting entries at root level in wxFileConfig
backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 14:38:19 +00:00
Julian Smart
e05c4ff66a Backported [ 622089 ] wxTR_EDIT_LABELS vs wxTR_MULTIPLE style
Fix for wxTreeCtrl label editing in wxTR_MULTIPLE mode


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 14:31:20 +00:00
Julian Smart
87d05605b5 wxCaret::SetSize correction for showing caret
Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 14:26:29 +00:00
Julian Smart
bc9406afe6 Fx for sending event from wxCheckListBox::Check().
Backported from head.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 14:20:49 +00:00
Julian Smart
9856829d76 Fix for explicit keyword detection (VC++)
backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 14:06:36 +00:00
Julian Smart
eddd296499 Don't use stipples in DoDrawText (backported from CVS head)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 12:28:14 +00:00
Julian Smart
bed2d80c90 Set orientation for scrollbar events (backported from CVS head)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 12:23:01 +00:00
Julian Smart
09007b50a0 Fixed assert (and crash in debug) in wxFileConfigGroup::DeleteSubgroupByName
Backported from CVS head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 12:19:23 +00:00
Julian Smart
98a67aa507 Backported SetScrollbars bug fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 12:03:09 +00:00
Julian Smart
6c11eb5b41 Backported fix: wxMSW::wxStaticText::GetBestSize() was wrong by '&' width
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-06 11:35:32 +00:00
Julian Smart
f7732c4385 Fix for getting all frames from GIF animation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-05 18:59:50 +00:00
Julian Smart
5a242608b5 Reverted previous patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-05 13:11:25 +00:00
Julian Smart
756284f00a Applied patch [ 715449 ] Fix MSW cursor errors
(already implicit in CVS trunk)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-05 10:51:54 +00:00
Julian Smart
0bab18a8e0 Added a const for CW compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-05 10:38:18 +00:00
Julian Smart
9279e47404 Applied patch [ 705301 ] Don't send event for wxSplitter::Unsplit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-05 10:34:59 +00:00
Robin Dunn
031febef4f Handle checkable items the right way in all cases
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-04 22:21:38 +00:00
Robin Dunn
ffa0f3dd9b Added a new "wx" package that will dynamically import from the
wxPython package and rename wxFooBar --> FooBar.  That means that
people imports without "import *" and can use names like wx.Frame
instead of wx.wxFrame.  This is phase 1 of a full transition to the
new namespace.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-04 17:59:07 +00:00
Robin Dunn
915f4a09b5 Added a new "wx" package that will dynamically import from the
wxPython package and rename wxFooBar --> FooBar.  That means that
people imports without "import *" and can use names like wx.Frame
instead of wx.wxFrame.  This is phase 1 of a full transition to the
new namespace.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-04 17:51:27 +00:00
Robin Dunn
d38b3b9620 Made an eopty stub of SetSelection for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-04 17:34:41 +00:00
Roger Gammans
09e6ff8c42 * rename maxOnOverflow parameter to CoordToRowOrCol() to clipToMinMax
* ensure CoordToRowOrCol() range is  0 -> nMax if clipOnMinMax is set
                                and -1 -> nMax if clipOnMinMax is not set

 * check on uses of YToRow() / XToCol() and replace with
   calls internalYToRow() / internalXToCol() removing any external
   overflow handling where appropriate.

* Add tests for overflow to prevent sending 'off grid' label events,
   would be indistinguishable from CornerLabel events.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 21:08:43 +00:00
Robin Dunn
8ac35652ba Correction to my new menu code: handle submenus on menubar menus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 21:01:52 +00:00
Robin Dunn
0cc89f950e Fix menu event propogation to be consistent across platforms, and with
the docs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 18:40:46 +00:00
Robin Dunn
073233381b Fixed menu event propogation to be consistent across platforms, and
with the docs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 18:39:20 +00:00
Julian Smart
b6f6e5a77e Applied patch [ 706329 ] [wxMac] Fixes wxGetLocalTimeMillis
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 13:01:59 +00:00
Julian Smart
4db672bd7c Applied patch [ 708377 ] Make NET (smapi.cpp) UNICODE compatible
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 10:42:56 +00:00
Julian Smart
54a6eb4dee Applied patch [ 713459 ] wxUniv/GTK compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 10:29:07 +00:00
Julian Smart
d8134e0bec Unicode-enabled the STC sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 09:09:06 +00:00
Robin Dunn
24d3bad8d6 SWIGged updates for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 02:49:09 +00:00
Robin Dunn
592778bad6 SWIGged updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 02:48:59 +00:00
Robin Dunn
9f8ef6c168 SWIGged updates for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 02:48:43 +00:00
Robin Dunn
9339eb0fe4 fixed typo in parameter name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 02:27:54 +00:00
Robin Dunn
11acaf87d7 Added SetSelection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 02:27:33 +00:00
Robin Dunn
a0973ce40c Added a comment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 02:27:03 +00:00
Robin Dunn
3bd7099bb4 removed special case for wxMac, not needed any more
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-03 02:21:19 +00:00
Julian Smart
f17ce86047 Applied patch [ 705212 ] wxTextCtrl::SetSelection() for wxGTK2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 17:55:42 +00:00
Julian Smart
8686744068 Applied [ 703017 ] TreeCtrl sample build fails when using generic control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 14:40:35 +00:00
Julian Smart
3dbebf5144 Applied patch [ 700313 ] Allow wxUSE_OWNER_DRAWN = 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 14:26:58 +00:00
Julian Smart
125372dd45 Applied [ 700293 ] FL Unicode patches
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 14:14:13 +00:00
Julian Smart
46be20d9be Applied patch [ 694561 ] FL Release build DLL include path
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 11:15:10 +00:00
Julian Smart
84406ac8be Fixed version convention for VC++ project files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 08:07:24 +00:00
Robin Dunn
58ccbbc7b7 Made the version number information more robust and uh, informative.
Also added asserts to check that the major.minor versions of wxPython
and wxWindows match.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 01:49:07 +00:00
Robin Dunn
d842ec8482 Demo tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 01:47:11 +00:00
Robin Dunn
509b8f9b5f Added missing method
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 01:46:56 +00:00
Robin Dunn
4d2a9c1a5f cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 01:46:44 +00:00
Julian Smart
e63aab5adf Version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-01 16:49:41 +00:00
Robin Dunn
e44b4b86f1 SWIGged updates for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-01 05:15:09 +00:00
Robin Dunn
9d05742271 SWIGged updates for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-01 01:51:26 +00:00
Robin Dunn
c47e337d22 Forgot to add this image...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-01 01:50:41 +00:00
Robin Dunn
66a1929a95 Updated ShapedWindow demo, don't try to start out without the shape.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-01 01:40:21 +00:00
Robin Dunn
8756135df1 README tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-01 01:39:39 +00:00
Robin Dunn
f6f41ac61a SWIGged code updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-01 01:38:07 +00:00
Robin Dunn
c21b5bcd98 Changed wxSWIG to not generate Python code using apply, (since it will
be deprecated in the future) wxSWIG will use spam(*args, **kw) syntax
instead.  Also changed the generated __repr__ methods to be a bit more
informative.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-01 01:36:08 +00:00
Václav Slavík
9137f764b6 XRC's unknown widget container handles removal of the widget now (backported)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-31 22:03:28 +00:00
Mattia Barbon
deae97bfa5 Applied patch [ 702254 ] Life: Fix to page scrolling
from Hugh Gibson (backport).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-30 19:15:24 +00:00
Robin Dunn
ebad4a640c Fixed compile warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-30 06:22:12 +00:00
Robin Dunn
2469ff1643 Allow label edits
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-30 06:21:50 +00:00
Robin Dunn
70f8442083 Added ShapedWindow sample to the wxPython demo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-30 06:20:45 +00:00
Robin Dunn
17d270987a Added wxTLW::SetShape and implementations for wxGTK, wxMSW and an
empty stub for wxMac.
Added some generic helpers and a new ctor to wxRegion.
Added samples/shaped.
(Backport to 2.4 from 2.5)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-29 19:25:07 +00:00
Robin Dunn
28b9bd356d Forgot to remove the "virtual" for binary compatibility...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-29 19:17:46 +00:00
Robin Dunn
8c879ff9c5 Added wxTLW::SetShape and implementations for wxGTK, wxMSW and an
empty stub for wxMac.
Added some generic helpers and a new ctor to wxRegion.
Added samples/shaped.
(Backport to 2.4 from 2.5)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-29 19:03:04 +00:00
Bryan Petty
9f5fc44733 This commit was manufactured by cvs2svn to create branch
'WX_2_4_BRANCH'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-29 19:03:04 +00:00
Václav Slavík
2721bd7e21 fixed bug #708570: Request 'silver' be allowed as a XPM value
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-29 10:19:32 +00:00
Chris Elliott
1ed0735c53 fix build for watcom
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-27 13:35:30 +00:00
Chris Elliott
23200777d1 fix build for watcom
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-27 13:23:04 +00:00
Chris Elliott
19778f31bd fix build for watcom
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-27 12:25:20 +00:00
Chris Elliott
38643da5dc fix lib build for watcom
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-27 12:12:49 +00:00
Chris Elliott
c7999962a3 fix for new watcom
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-26 20:44:28 +00:00
Julian Smart
9eb210eadb Fix for splittree under wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-26 14:17:00 +00:00
Chris Elliott
bcbdee05d3 modify makefile for watcom
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-25 21:26:02 +00:00
Chris Elliott
068dd44056 modify makefile for watcom
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-25 21:17:41 +00:00
Julian Smart
607422284d Use virtual functions to help splittree work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-25 18:49:34 +00:00
Robin Dunn
5022eecae0 demo tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-25 04:10:08 +00:00
1140 changed files with 4397 additions and 812890 deletions

View File

@@ -1,19 +0,0 @@
.DS_Store
.emacs.desktop
.gdb_history
MANIFEST
_build_dmg
_build_rpm
build
build-gtk
build-gtk2
build-gtk2.unicode
build-pkg
build-pkg-debug
build.local
build.unicode
dist
licence
s.bat
temp
update.log

View File

@@ -1,72 +0,0 @@
Building wxPython on Mac OS X
-----------------------------
These are the steps I have used for building wxPython on Mac OS X 10.x
with the Apple Developer Tools, a.k.a the Darwin version. I assume
that you know your way around a command line and that you know how to
get things from various CVS repositories as needed.
1. "MacPython-OSX" 2.3 is required. There is a disk image with an
installer package in the wxPython Sourceforge download area, in
this group:
http://sourceforge.net/project/showfiles.php?group_id=10718&release_id=84730
If, for some reason you need to build your own Python, get the
source from www.python.org and follow the instructions in the
Mac/OSX/README file to build and install the Python.framework and
Python tools.
One last thing, make sure that /usr/local/bin is in your PATH
environment variable since that is where the new python and pythonw
commands will be located.
2. In a wxWindows CVS tree make a build directory. (You can also use
a CVS snapshot located in http://wxwindows.org/snapshots/ or the
released wxPythonSrc-*.tr.gz archive.)
cd ~/proj/wxWindows # or wherever you put it
mkdir build
3. Run configure from that build directory.
cd build
../configure --with-mac --with-opengl --enable-debug
4. Make and install wxMac.
make
sudo make install
5. Build and install wxPython.
cd ../wxPython
python setup.py build install
If you would like to install to someplace besides the Python
site-packages directory (such as to your home directory) then you
can add "--root=<path>" after the "install" command. To use
wxPython like this you'll need to ensure that the directory
containing wxPyrthon is contained in in the PYTHONPATH environment
variable.
6. Test. Just navigate in the Finder to the demo directory and double
click demo.py, or simple.py, or whatever you want to run. Or from
a command line you can run it this way:
cd demo
pythonw demo.py
7. Figure out what's wrong, figure out how to fix it, and then send
the patches to me. <wink>
--Robin

View File

@@ -1,340 +0,0 @@
Building wxPython on Unix or Unix-like Systems
----------------------------------------------
NOTE: You should probably look at the ../ README.1st.txt file for
directions for how to build wxPython the "new way." This files
describes the "old way" to build on unix-like systems. The difference
is very simple: The new way uses a private copy of wxGTK while the
old way uses either an existing wxGTK that may be installed and used
by other apps, or you can build a wxGTK that will be accissible by
other apps.
NOTE 2: I use a tool called SWIG (http://www.swig.org) to help
generate the C++ sources used in the wxPython extension module.
However you don't need to have SWIG unless you want to modify the *.i
files. I've made several modifications to and older version of SWIG
that are specific to wxPython's needs and so the modified sources are
included in the wx CVS at .../wxPython/wxSWIG. But because of the
size and since most people won't need it my SWIG is not included in
the wxPythonSrc tarball. You'll need to get it from CVS or a CVS
snapshot.
If you need to modify the *.i files for wxPython then you will need to
build wxswig. Change to the .../wxPython/wxSWIG directory and run:
configure
make
(Do not run "make install" as wxswig is run in-place.) You'll then
need to change a flag in the setup.py script as described below so the
wxPython build process will use SWIG if needed.
I use the new Python Distutils tool to build wxPython. It is included
with Python 2.0, but if you want to use Python 1.5.2 or 1.6 then
you'll need to download and install Distutils 1.0 from
http://www.python.org/sigs/distutils-sig/
Okay, now on the the fun stuff...
1. Compile and/or install glib and gtk+
---------------------------------------
A. First of all, check and see if you've already got glib/gtk+ on your
system, all the Linux distributions I know of come with it, at
least as an option. Look for libglib.* and libgtk.* in your system's
standard library directories. You'll also need the headers and
config scripts in order to build things that use glib/gtk. Try
running gtk-config:
gtk-config --version
If you have version 1.2.7 or better then you're all set. Otherwise
either get the pacakges for your unix distribution and install them
or get the sources from www.gtk.org and build and install them.
The best version to get is the latest 1.2.x release as the
wxWindows support for GTK 2.x is still beta-level. (Most tings
work great though, and it looks real nice.)
2. Compile and/or install wxGTK
-------------------------------
A. You can find the sources and RPMs for wxGTK at
http://wxwindows.org/, just follow the download links from the
navigation panel.
Source code for wxGTK is now included with the wxPythonSrc tarball,
and is the recommended way to get released wxGTK source code if you
plan on building both.
You can also check out a current snapshot of the sources from the
CVS server. (Some information about annonymous CVS access is at
http://wxwindows.org/cvs.htm.) The advantage of using CVS is that
you can easily update as soon as the developers check in new
sources or fixes. The advantage of using a released version is
that it usually has had more thorough testing done. You can decide
which method is best for you.
B. You'll usually want to use a version of wxGTK that has the same
version number as the wxPython sources you are using. (Another
advantage of using wxPythonSrc or CVS is that you'll get both at
the same time.)
C. If using the RPMs be sure to get both the wxGTK and wxGTK-devel
RPMs (at a minimum) and then install them as root.
rpm -Uhv wxGTK-2.2.2-0.i386.rpm wxGTK-devel-2.2.2-0.i386.rpm
D. If using the sources (either from the tarball or from CVS) then
configure it like this:
cd wxWindows # or whatever your top-level directory is called
mkdir build
cd build
../configure --with-gtk --enable-geometry
There are gobs and gobs of options for the configure script, run
../configure --help to see them all. I'll describe some that I find
useful here.
If you have OpenGL or compatible libraries installed, then add the
--with-opengl flag.
If you are on Solaris and are using a recent version of GCC, then
you'll probably want to add the --enable-permissive flag so the
compiler won't barf on your broken X11 header files.
To make a debugging version of wxGTK, add the --enable-debug flag.
This sets the -g flag for the compiler and also activates some
special debugging code in wxWindows by defining the __WXDEBUG__
macro. You'll get some extra asserts, failure logging, etc.
If you are using GTK 2.x then you'll want to add --enable-gtk2 and
probably also --enable-unicode.
E. Now just compile and install. You need to use GNU make, so if your
system has something else get GNU make and build and install it and
use it instead of your system's default make command.
make
make install
The last step will probably have to be done as root. Also, if your
system needs anything done to update the dynamic loader for shared
libraries, (such as running ldconfig on Linux) then do it now.
F. You can test your build by changing to one of the directories under
build/samples or build/demos, running make and then running the
executable that is built.
3. Compile and install wxPython
-------------------------------
A. You have the same options (and same advantages/disadvantages) for
getting the wxPython source, either a released snapshot or from
CVS. The released version file is named wxPythonSrc-[version].tar.gz
and is available at http://wxpython.org/download.php. If you want
to use CVS you'll find wxPython in the wxWindows CVS tree (see
above) in the wxWindows/wxPython directory.
B. wxPython is built with the standard Python Distutils tool and
currently includes it's own snapshot of the latest version of
distutils which can also be used with previous versions of Python
On Unix systems Distutils figures out what commands and flags to
use for the compiler and linker by looking in the Makefile that was
used to build Python itself. Most of the time this works okay. If
it doesn't, there doesn't seem to be a way to override the values
that Distutils uses without hacking either Distutils itself, or
Python's Makefile. (NOTE: This has been changed with the
distutilsincluded with Python 2.3 but I havn't yet looked into how
best to utilize this in wxPython...)
While we're on the subject of how Python was built... Since
wxPython is a C++ extension some platforms and/or compilers will
require that the Python executable was linked with the C++ linker
in order for everything to work correctly. If you build and
install Python yourself then this is easy to take care of,
otherwise you may have to mess with binary packages or bribe your
system administrator...
In my case on Solaris wxPython applications would core dump on
exit. The core file indicated that the fault happened after
_exit() was called and the run-time library was trying to execute
cleanup code. After relinking the Python executable the problem
went away. To build Python to link with the C++ linker do this:
cd Python-2.0 # wherever the root of the source tree is
rm python # in case it's still there from an old build
make LINKCC=g++ # or whatever your C++ command is
make install
I recently built Python 2.1.3 and Python 2.2.1 on Solaris and did
not have to resort to this workaround so apparently things are
getting better there. I will leave this note here though in case
there are similar issues elsewhere. However I did run into a
Python build issue that affects the wxPython build when attempting
to use SunCC instead of GNU gcc. See the note below titled
"Building with non-GNU compilers" if you are interested.
C. Change to the root wxPython directory and look at the setup.py
file. This is the script that configures and defines all the
information that Distutils needs to build wxPython. There are some
options near the begining of the script that you may want or need
to change based on your system and what options you have selected
up to this point, (sources from tar.gz or from CVS, etc.) You can
either change these flags directly in setup.py or supply them on
the command-line.
BUILD_GLCANVAS Set to zero if you don't want to build the
Open GL canvas extension module. If you don't
have OpenGL or compatible libraries then you'll
need to set this to zero.
BUILD_OGL Set to zero if you don't want to build the
Object Graphics Library extension module.
BUILD_STC Set to zero if you don't want to build the
wxStyledTextCtrl (the Scintilla wrapper)
extension module.
USE_SWIG If you have edited any of the *.i files you
will need to set this flag to non-zero so SWIG
will be executed to regenerate the wrapper C++
and shadow python files.
etc.
D. To build and install wxPython you simply need to execute the
setup.py script. If you have more than one version of Python
installed, be sure to execute setup.py with the version you want to
build wxPython for. Depending on the permissions on your
site-packages directory you may need to be root to run the install
command.
python setup.py build install
If you need to change any of the build flags that can also be done
on the setup.py command line, like this:
python setup.py BUILD_GLCANVAS=0 build install
If you are using GTK 2.x then you'll want to add these flags:
python setup.py WXPORT=gtk2 UNICODE=1 build install
If you would like to install to someplace besides the Python
site-packages directory (such as to your home directory) then you
can add "--root=<path>" after the "install" command. To use
wxPython like this you'll need to ensure that the directory
containing wxPyrthon is contained in in the PYTHONPATH environment
variable.
E. At this point you should be able to change into the wxPython/demo
directory and run the demo:
python demo.py
F. If you would like to make a test build that doesn't overwrite any
installed version of wxPython you can do so with this command
instead of the install command above:
python setup.py build_ext --inplace
This will build the wxPython package in the local wxPython
directory instead of installing it under your Python installation.
To run using this test version just add the base wxPython source
directory to the PYTHONPATH:
export PYTHONPATH=~/projects/wxWindows/wxPython
# or whatever is required for your shell
cd ~/projects/wxWindows/wxPython/demo
python demo.py
4. Building with non-GNU compilers
----------------------------------
As mentioned above Python's distutils uses whatever compiler Python
was compiled with to compile extension modules. It also appears that
distutils assumes that this compiler can compile C or C++ sources as
distutils makes no differentiation between the two. For builds using
GNU gcc and a few other compilers this is not an issue as they will
determine the type of source from the file extension. For SunCC (and
probably other compilers that came from cfront) it won't work as the C
compiler (cc) is totally separate from the C++ compiler (CC). This
causes distutils to attempt to compile the wxPython sources with the C
compiler, which won't work.
There may be better ways to get around this, but here is the
workaround I devised. I created a script that will execute either cc
or CC based on the file extension given to it. If Python uses this
script for its compiler then it will also be used by extensions built
with distutils and everybody will be more or less happy. Here is a
copy of the script I used. It was a fairly quick rush job so there
are probably issues with it but it worked for me.
#!/bin/bash
#--------------------------------------------------------------
# Try to determine type of file being compiled and then
# launch cc for C sources or CC for C++.
#
args=$@
is_C=
for arg in $args; do
# is the arg a file that exists?
if [ -e $arg ]; then
# does it end in ".c"?
if [ "${arg:${#arg}-2}" == ".c" ]; then
is_C=yes
fi
fi
done
# if the flag wasn't set then assume C++ and execute CC,
# otherwise execute cc.
if [ -z $is_C ]; then
exec CC -w $@
else
exec cc -w $@
fi
#--------------------------------------------------------------
I called it pycc, put it in ${prefix}/bin and set its execute
permission bit.
The next step is to configure and build Python such that it uses pycc
as it's compiler. You can do that by setting CC in your environment
before running configure, like this in bash:
export CC=pycc
configure
After making and installing Python with this configuration you should
be able to build wxPython as described in the steps above.
-----------------
robin@alldunn.com

View File

@@ -1,303 +0,0 @@
Building wxPython on Win32
--------------------------
Building wxPython for use on win32 systems is a fairly simple process
consisting of just a few steps. However depending on where you get
your sources from and what your desired end result is, there are
several permutations of those steps. At a high level the basic steps
are:
1. Get the sources
2. Build the wxWindows DLL
3. Build and Install wxPython
We'll go into more detail of each of these steps below, but first a
few bits of background information on tools.
I use a tool called SWIG (http://www.swig.org) to help generate the
C++ sources used in the wxPython extension module. However you don't
need to have SWIG unless you want to modify the *.i files. I've made
several modifications to SWIG specific to wxPython's needs and so the
modified sources are included in the wx CVS at.../wxPython/wxSWIG.
But because of the size and since most people won't need it my SWIG is
not included in the wxPythonSrc tarball. You'll need to get it from
CVS or a CVS snapshot.
If you need to modify the *.i files for wxPython then change to this
directory and run:
nmake -f makefile.vc
Then you'll need to change a flag in the setup.py script as described
below so the wxPython build process will use SWIG if needed.
I use the new Python Distutils tool to build wxPython. It is included
with Python 2.0, but if you want to use Python 1.5.2 or 1.6 then
you'll need to download and install Distutils 1.0 from
http://www.python.org/sigs/distutils-sig/
I use Microsoft Visual C++ 6.0 (5.0 with the service packs should work
also) to compile the wxPython C++ sources. Since I am using Distutils
it should be easier now to build with other win32 compilers such as
the free mingw32 or Borland compilers, but I havn't tried them yet.
If anybody wants to try it I'll take any required patches for the
setup script and for these instructions.
UNICODE
-------
To build the version of wxWindows/wxPython that uses the unicode
version of the Win32 APIs, just follow the steps below with these
changes:
a. You'll need the MSLU runtime DLL and import lib. The former can
be downloaded from Microsoft, the latter is part of the latest
Platform SDK from Microsoft (see msdn.microsoft.com for
details). An alternative implementation of import lib can be
downloaded from http://libunicows.sourceforge.net
b. Add "UNICODE=1 MSLU=1" to the nmake command line when building
wxWindows.
c. Add "UNICODE=1" to the setup.py commandline when building
wxPython.
d. See the notes in CHANGES.txt about unicode.
And now on to the fun stuff...
1. Get the sources
------------------
A. You can either use a tarball with the released version of the
source code for wxWindows/wxPython, or you can get current
development sources from the CVS repository. (Some information
about annonymous CVS access is at the http://wxwindows.org/cvs.htm
site.) The advantage of using CVS is that you can easily update as
soon as the developers check in new sources or fixes. The
advantage of using a released version is that it usually has had
more thorough testing done. You can decide which method is best
for you. The released version file is named
wxPythonSrc-[version].tar.gz and is available from the wxPython
website at http://wxpython.org/download.php. You can use WinZip to
unpack it if you don't have tar and gzip.
B. 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 the top level directory. For example:
set WXWIN=c:\wx\wxPythonSrc-2.4.0.4
You'll probably want to add that line to your autoexec.bat or
System Properties depending on the type of system you are on.
C. Change to the %WXWIN%\include\wx\msw directory and copy setup0.h to
setup.h and then edit setup.h. This is how you control which parts
of wxWindows are compiled into or left out of the build, simply by
turning options on or off. I have the following differences from
the default setup0.h in my setup.h, but you can experiment with
other settings if you like:
WXWIN_COMPATIBILITY_2_2 0
wxDIALOG_UNIT_COMPATIBILITY 0
wxUSE_DEBUG_CONTEXT 1
wxUSE_MEMORY_TRACING 1
wxUSE_CMDLINE_PARSER 0
wxUSE_FSVOLUME 0
wxUSE_DIALUP_MANAGER 0
wxUSE_DYNAMIC_LOADER 0
wxUSE_TREELAYOUT 0
wxUSE_MS_HTML_HELP 0
wxUSE_POSTSCRIPT 1
** 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
---------------------------
A. Although MSVC project files are provided I always use the makefiles
to build wxWindows because by default the flags are compatible with
Python, (and I make sure they stay that way.) You would have to
edit the project files a bit to make it work otherwise.
B. There are three different types of wxWindows DLLs that can be
produced by the VC makefile simply by providing a flag on the nmake
command-line, I call the three types DEBUG, FINAL, and HYBRID.
Here are some more details:
DEBUG Specified with "FINAL=0" and produces a DLL named
wxmsw[version]d.dll. This DLL is compiled with full
debugging information and with the __WXDEBUG__ macro set,
which enables some debugging-only code in wxWindows such
as assertions and failure log messages. The /MDd flag is
used which means that it is linked with the debugging
version of the C runtime library and also that you must
use the debugging version of Python, (python_d.exe and
pythonXX_d.dll) which also means that all extensions
loaded by Python should also have the _d in the name.
With this option you can use the MSVC debugger to trace
though the Python interpreter, as well as the code for the
wxPython extension and the wxWindows DLL.
FINAL Specified with "FINAL=1" and produces a DLL named
wxmsw[version].dll. This DLL is compiled with optimizations
turned on and without debugging information and without
__WXDEBUG__. The /MD flag is used which means that you
can use this version with the standard python.exe.
HYBRID Specified with "FINAL=hybrid" and produces a DLL named
wxmsw[version]h.dll. This DLL is almost the same as the
FINAL version except the __WXDEBUG__ is used which means
that you will get extra runtime assertions and validations
from wxWindows. If any of these fail then they are turned
into a Python exception that you can catch and deal with
in your code. This is the version that I use when making
the binary installer for win32.
Since different DLL names and object file directories are used you
can build all three types if you like.
C. Change to the %WXWIN%\src\msw directory and type the following command,
using the value for FINAL that you want:
nmake -f makefile.vc dll 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
DLL and some library files in %WXWIN%\lib.
D. You'll either need to add %WXWIN%\lib to the PATH or copy the DLL
file to a directory already on the PATH so the DLL can be found at
runtime. Another option is to copy the DLL to the directory that
the wxPython pacakge is installed to, for example,
c:\Python22\lib\site-packages\wxPython.
E. You can test your build by changing to one of the directories under
%WXWIN%\samples or %WXWIN\demos and typing (using the right FINAL flag):
nmake -f makefile.vc FINAL=hybrid WXUSINGDLL=1
and then executing the resulting .exe file.
3. Build and Install wxPython
-----------------------------
A. As mentioned previouslly, wxPython is built with the standard
Python Distutils tool. If you are using Python 2.0 or later you
are all set, otherwise you need to download and install Distutils
1.0 from http://www.python.org/sigs/distutils-sig/.
B. Change to the root wxPython directory and look at the setup.py
file. This is the script that configures and defines all the
information that Distutils needs to build wxPython. There are some
options near the begining of the script that you may want or need
to change based on what options you have selected up to this point,
(type of DLL built, sources from tar.gz or from CVS, etc.) You can
either change these flags directly in setup.py or supply them on
the command-line.
BUILD_GLCANVAS Set to zero if you don't want to build the
Open GL canvas extension module.
BUILD_OGL Set to zero if you don't want to build the
Object Graphics Library extension module.
BUILD_STC Set to zero if you don't want to build the
wxStyledTextCtrl (the Scintilla wrapper)
extension module.
USE_SWIG If you have edited any of the *.i files you
will need to set this flag to non-zero so SWIG
will be executed to regenerate the wrapper C++
and shadow python files.
etc.
C. To build and install wxPython you simply need to execute the
setup.py script. If you have more than one version of Python
installed, be sure to execute setup.py with the version you want to
build wxPython for.
Depending on what kind of wxWindows DLL you built there are
different command-line parameters you'll want to pass to setup (in
addition to possibly one or more of the above):
FINAL: python setup.py install
DEBUG: python setup.py build --debug install
HYBRID: python setup.py HYBRID=1 install
NOTE: If you get an internal compiler error from MSVC then you
need to edit setup.py and add in the /GX- flag that is normally
commented out. Just search for "GX-" and uncomment it so it is put
into the cflags list.
If you would like to install to someplace besides the Python
site-packages directory (such as to your home directory) then you
can add "--root=<path>" after the "install" command. To use
wxPython like this you'll need to ensure that the directory
containing wxPyrthon is contained in in the PYTHONPATH environment
variable.
D. At this point you should be able to change into the wxPython\demo
directory and run the demo:
python demo.py
E. If you would like to make a test build that doesn't overwrite the
installed version of wxPython you can do so with one of these
commands instead of the install command above:
FINAL: python setup.py build_ext --inplace
DEBUG: python setup.py build_ext --debug --inplace
HYBRID: python setup.py HYBRID=1 build_ext --inplace
This will build the wxPython package in the local wxPython
directory instead of installing it under your Python installation.
To run using this test version just add the base wxPython source
directory to the PYTHONPATH:
set PYTHONPATH=%WXDIR%\wxPython
cd %WXDIR%\wxPython\demo
python demo.py
That's all folks!
-----------------
robin@alldunn.com

File diff suppressed because it is too large Load Diff

View File

@@ -1,205 +0,0 @@
include *.txt
include my_distutils.py
## include my_install_data.py
include licence/*.txt
include b
include b.bat
include MANIFEST.in
include SWIG/*
exclude SWIG/CVS/*
include demo/*.py
include demo/*.wdr
include demo/*.txt
include demo/*.xml
include demo/*.ico
include demo/bitmaps/*.bmp
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/data/*.png
include demo/data/*.htm
include demo/data/*.html
include demo/data/*.bmp
include demo/data/*.txt
include demo/data/*.i
include demo/data/*.h
include demo/data/*.py
include demo/data/*.wav
include demo/data/*.wdr
include demo/data/*.xrc
include demo/dllwidget/Makefile
include demo/dllwidget/makefile.*
include demo/dllwidget/*.cpp
include demo/dllwidget/*.py
include samples/doodle/*.txt
include samples/doodle/*.py
include samples/doodle/*.iss
include samples/doodle/sample.ddl
include samples/wxProject/*.txt
include samples/wxProject/*.py
include samples/StyleEditor/*.py
include samples/StyleEditor/*.txt
include samples/StyleEditor/*.cfg
include samples/pySketch/*.py
include samples/pySketch/images/*.bmp
include samples/frogedit/*.py
include samples/embedded/*.py
include samples/embedded/*.cpp
include samples/embedded/*.txt
include samples/embedded/*.vc
include samples/embedded/*.unx
include samples/embedded/*.ico
include samples/embedded/*.xpm
include wxPython/lib/*.py
include wxPython/lib/*.txt
include wxPython/lib/*.wdr
include wxPython/lib/editor/*.py
include wxPython/lib/editor/*.txt
include wxPython/lib/mixins/*.py
include wxPython/lib/PyCrust/*.py
include wxPython/lib/PyCrust/*.txt
include wxPython/lib/PyCrust/*.ico
exclude wxPython/*
exclude tests
include src/*.i
include src/*.py
include src/*.cpp
include src/*.c
include src/*.h
include src/*.ico
include src/*.rc
include src/wxc.pyd.manifest
include src/msw/*.cpp
include src/msw/*.h
include src/msw/*.py
include src/gtk/*.cpp
include src/gtk/*.h
include src/gtk/*.py
include src/mac/*.cpp
include src/mac/*.h
include src/mac/*.py
include wxPython/tools/*.py
include wxPython/tools/XRCed/CHANGES
include wxPython/tools/XRCed/TODO
include wxPython/tools/XRCed/README
include wxPython/tools/XRCed/*.py
include wxPython/tools/XRCed/*.xrc
include wxPython/tools/XRCed/*.ico
include wxPython/tools/XRCed/*.sh
include scripts/*
include contrib/glcanvas/*.i
include contrib/glcanvas/*.py
include contrib/glcanvas/*.cpp
include contrib/glcanvas/*.c
include contrib/glcanvas/*.h
include contrib/glcanvas/msw/*.cpp
include contrib/glcanvas/msw/*.h
include contrib/glcanvas/msw/*.py
include contrib/glcanvas/gtk/*.cpp
include contrib/glcanvas/gtk/*.h
include contrib/glcanvas/gtk/*.py
include contrib/glcanvas/mac/*.cpp
include contrib/glcanvas/mac/*.h
include contrib/glcanvas/mac/*.py
include contrib/ogl/*.txt
include contrib/ogl/*.i
include contrib/ogl/*.py
include contrib/ogl/*.cpp
include contrib/ogl/*.c
include contrib/ogl/*.h
include contrib/ogl/contrib/include/wx/ogl/*.h
include contrib/ogl/contrib/src/ogl/*.cpp
include contrib/stc/*.txt
include contrib/stc/*.i
include contrib/stc/*.py
include contrib/stc/*.cpp
include contrib/stc/*.c
include contrib/stc/msw/*.h
include contrib/stc/msw/*.cpp
include contrib/stc/msw/*.py
include contrib/stc/gtk/*.h
include contrib/stc/gtk/*.cpp
include contrib/stc/gtk/*.py
include contrib/stc/mac/*.h
include contrib/stc/mac/*.cpp
include contrib/stc/mac/*.py
include contrib/stc/contrib/include/wx/stc/*.h
include contrib/stc/contrib/src/stc/*.h
include contrib/stc/contrib/src/stc/*.cpp
include contrib/stc/contrib/src/stc/*.txt
include contrib/stc/contrib/src/stc/*.py
include contrib/stc/contrib/src/stc/stc.*.in
include contrib/stc/contrib/src/stc/scintilla/include/*.h
include contrib/stc/contrib/src/stc/scintilla/include/*.iface
include contrib/stc/contrib/src/stc/scintilla/src/*.h
include contrib/stc/contrib/src/stc/scintilla/src/*.cxx
include contrib/stc/contrib/src/stc/scintilla/*.txt
include contrib/xrc/*.txt
include contrib/xrc/*.i
include contrib/xrc/*.py
include contrib/xrc/*.cpp
include contrib/xrc/*.c
include contrib/xrc/*.h
include contrib/xrc/contrib/include/wx/xrc/*.h
include contrib/xrc/contrib/src/xrc/*.cpp
include contrib/xrc/contrib/src/xrc/*.txt
include contrib/xrc/contrib/src/xrc/README.EXPAT
include contrib/xrc/contrib/src/xrc/expat/*.txt
include contrib/xrc/contrib/src/xrc/expat/xmlparse/*.c
include contrib/xrc/contrib/src/xrc/expat/xmlparse/*.h
include contrib/xrc/contrib/src/xrc/expat/xmltok/*.c
include contrib/xrc/contrib/src/xrc/expat/xmltok/*.h
include contrib/gizmos/*.txt
include contrib/gizmos/*.i
include contrib/gizmos/*.py
include contrib/gizmos/*.cpp
include contrib/gizmos/*.c
include contrib/gizmos/*.h
include contrib/gizmos/contrib/include/wx/gizmos/*.h
include contrib/gizmos/contrib/src/gizmos/*.cpp
include contrib/gizmos/contrib/src/gizmos/*.xpm
include contrib/gizmos/contrib/src/gizmos/*.txt
include contrib/iewin/*.txt
include contrib/iewin/*.i
include contrib/iewin/*.py
include contrib/iewin/*.cpp
include contrib/iewin/*.c
include contrib/iewin/*.h
include contrib/dllwidget/*.txt
include contrib/dllwidget/*.i
include contrib/dllwidget/*.py
include contrib/dllwidget/*.cpp
include contrib/dllwidget/*.c
include contrib/dllwidget/*.h
include demo/dllwidget/*.h
include demo/dllwidget/*.cpp
include demo/dllwidget/*.py
include demo/dllwidget/Makefile
include demo/dllwidget/makefile.*

View File

@@ -1,70 +0,0 @@
wxPython README
---------------
Welcome to the wonderful world of wxPython!
So where do you go from here? The best thing to do is to run the demo
and use its source code to help you learn how to use wxPython. Most
of the classes available are demonstrated there, and you can view the
sources directly in the demo so it is designed to help you learn. If
you are on Windows or OS X then you can run the demo just by double
clicking it's icon. If you are on Linux/Unix then change to the
directory containing the demo and type:
python demo.py
There are also some sample mini applications available for you to run
and to play with as a learning exercise.
The next thing you should do is join the wxPython-users maillist where
you can interact with a community of other users and developers who
are willing to help you learn, answer questions and solve problems.
To join the mail list just send an email message to the following
address from the account you want to receive the mail messages from
the list:
wxPython-users-subscribe@lists.wxwindows.org
There is also a good set of class reference documentation available
for wxPython, but currently it is geared for the C++ user. This may
be a little daunting at first, but with a little practice you'll
easily be able to "translate" from the C++ shown there to Python. Not
all classes documented are available in Python, but most of the GUI
related classes are.
Other Info
----------
Please also see the following files in this directory:
CHANGES.txt Information about new features, fixes,
etc. in each release.
../README.1st.txt Instructions for building wxGTK and
wxPython on Unix-like platforms the
"new way."
BUILD.unix.txt Instructions for building wxPython on
various Unix-like platforms the "old way."
BUILD.win32.txt Instructions for building wxPython on Windows.
BUILD.osx.txt Instructions for building wxPython on Mac OS X.
licence/* Text of the wxWindows license.
-----------------
Robin Dunn
robin@alldunn.com

View File

@@ -1,123 +0,0 @@
#!/bin/sh
function getpyver {
if [ "$1" = "15" ]; then
PYVER=1.5
elif [ "$1" = "20" ]; then
PYVER=2.0
elif [ "$1" = "21" ]; then
PYVER=2.1
elif [ "$1" = "22" ]; then
PYVER=2.2
elif [ "$1" = "23" ]; then
PYVER=2.3
else
echo You must specify Python version as first parameter.
exit
fi
}
getpyver $1
shift
python$PYVER -c "import sys;print '\n', sys.version, '\n'"
SETUP="python$PYVER -u setup.py"
FLAGS="USE_SWIG=1 IN_CVS_TREE=1" # BUILD_GLCANVAS=0"
OTHERFLAGS=""
# "c" --> clean
if [ "$1" = "c" ]; then
shift
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"
# "t" --> touch *.i files
elif [ "$1" = "t" ]; then
shift
#CMD="set CMD=touch src\*.i; touch contrib\glcanvas\*.i; touch contrib\ogl\*.i; touch contrib\stc\*.i"
CMD='find . -name "*.i" | xargs touch'
# "i" --> install
elif [ "$1" = "i" ]; then
shift
CMD="$SETUP $FLAGS $OTHERFLAGS build_ext install $*"
# "s" --> source dist
elif [ "$1" = "s" ]; then
shift
CMD="$SETUP $OTHERFLAGS sdist $*"
# "r" --> rpm dist
elif [ "$1" = "r" ]; then
WXPYVER=`python$PYVER -c "import setup;print setup.VERSION"`
for VER in 21 22; do
getpyver $VER
echo "*****************************************************************"
echo "******* Building wxPython for Python $PYVER"
echo "*****************************************************************"
SETUP="python$PYVER -u setup.py"
# 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 --python=python$PYVER
### --requires=python$PYVER
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 --binary-only --python=python$PYVER
### --requires=python$PYVER
# put the oringal setup.py back
cp setup.py.save setup.py
rm setup.py.*
# rename the binary RPM's
mv dist/wxPython-$WXPYVER-1.i386.rpm dist/wxPython-$WXPYVER-1-Py$VER.i386.rpm
mv dist/wxPython-gl-$WXPYVER-1.i386.rpm dist/wxPython-gl-$WXPYVER-1-Py$VER.i386.rpm
done
# rebuild the source dists without the munched up setup.py
$SETUP $OTHERFLAGS bdist_rpm --source-only
exit 0
# "f" --> FINAL (no debug)
elif [ "$1" = "f" ]; then
shift
CMD="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*"
# (no command arg) --> normal build for development
else
CMD="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace --debug $*"
fi
echo $CMD
eval $CMD
if [ "$OTHERCMD" != "" ]; then
echo $OTHERCMD
$OTHERCMD
fi

View File

@@ -1,117 +0,0 @@
@echo off
REM ----------------------------------------------------------------------
REM Note: This is a 4NT script
REM ----------------------------------------------------------------------
setlocal
set FLAGS=USE_SWIG=1 IN_CVS_TREE=1
rem Use non-default python?
iff "%1" == "15" .or. "%1" == "20" .or. "%1" == "21" .or. "%1" == "22" .or. "%1" == "23" then
set VER=%1
set PYTHON=%TOOLS%\python%1%\python.exe
shift
else
beep
echo You must specify Python version as first parameter.
quit
endiff
set SETUP=%PYTHON% -u setup.py
%PYTHON% -c "import sys;print '\n', sys.version, '\n'"
rem "c" --> clean
iff "%1" == "c" then
shift
set CMD=%SETUP% %FLAGS% clean %1 %2 %3 %4 %5 %6 %7 %8 %9
set OTHERCMD=del wxPython\*.pyd
rem just remove the *.pyd's
elseiff "%1" == "d" then
shift
set CMD=del wxPython\*.pyd
set OTHERCMD=del wxPython\*.pdb
rem touch all the *.i files so swig will regenerate
elseiff "%1" == "t" then
shift
set CMD=echo Finished!
find . -name "*.i" | xargs -l touch
rem "i" --> install
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 %1 %2 %3 %4 %5 %6 %7 %8 %9
rem "s" --> source dist
elseiff "%1" == "s" then
shift
set CMD=%SETUP sdist
rem "f" --> FINAL
elseiff "%1" == "f" then
shift
set CMD=%SETUP% %FLAGS% FINAL=1 build_ext --inplace %1 %2 %3 %4 %5 %6 %7 %8 %9
rem "h" --> HYBRID
elseiff "%1" == "h" then
shift
set CMD=%SETUP% %FLAGS% HYBRID=1 build_ext --inplace %1 %2 %3 %4 %5 %6 %7 %8 %9
rem "a" --> make all installers
elseiff "%1" == "a" then
shift
set CMD=echo Finished!
call b.bat 21 d
call b.bat 21 h
call b.bat 21 r
call b.bat 21 d UNICODE=1
call b.bat 21 h UNICODE=1
call b.bat 21 r UNICODE=1
call b.bat 22 d
call b.bat 22 h
call b.bat 22 r
call b.bat 22 d UNICODE=1
call b.bat 22 h UNICODE=1
call b.bat 22 r UNICODE=1
call b.bat 23 d
call b.bat 23 h
call b.bat 23 r
call b.bat 23 d UNICODE=1
call b.bat 23 h UNICODE=1
call b.bat 23 r UNICODE=1
rem "b" --> both debug and hybrid builds
elseiff "%1" == "b" then
shift
set CMD=echo Finished!
call b.bat %VER% %1 %2 %3 %4 %5 %6 %7 %8 %9
call b.bat %VER% h %1 %2 %3 %4 %5 %6 %7 %8 %9
rem (no command arg) --> normal build for development
else
set CMD=%SETUP% %FLAGS% HYBRID=0 build_ext --inplace --debug %1 %2 %3 %4 %5 %6 %7 %8 %9
endiff
echo %CMD%
%CMD%
iff "%OTHERCMD%" != "" then
echo %OTHERCMD%
%OTHERCMD%
endiff

View File

@@ -1 +0,0 @@
update.log

View File

@@ -1,3 +0,0 @@
These sub directories contain add-on modules that are not part of the
core wxPython, either because of licensing issues, optional code in
wxWindows, contrib code in wxWindows, or whatever.

View File

@@ -1,128 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dllwidget.cpp
// Purpose: Dynamically loadable C++ widget for wxPython
// Author: Vaclav Slavik
// Created: 2001/12/03
// RCS-ID: $Id$
// Copyright: (c) 2001 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "dllwidget.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/defs.h"
#include "wx/dynlib.h"
#include "wx/sizer.h"
#include "dllwidget.h"
IMPLEMENT_ABSTRACT_CLASS(wxDllWidget, wxPanel)
wxDllWidget::wxDllWidget(wxWindow *parent,
wxWindowID id,
const wxString& dllName, const wxString& className,
const wxPoint& pos, const wxSize& size,
long style)
: wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL | wxNO_BORDER,
className + wxT("_container")),
m_widget(NULL), m_lib(NULL), m_controlAdded(FALSE)
{
SetBackgroundColour(wxColour(255, 0, 255));
if ( !!className )
LoadWidget(dllName, className, style);
}
wxDllWidget::~wxDllWidget()
{
UnloadWidget();
}
void wxDllWidget::AddChild(wxWindowBase *child)
{
wxASSERT_MSG( !m_controlAdded, wxT("Couldn't load two widgets into one container!") );
wxPanel::AddChild(child);
m_controlAdded = TRUE;
wxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add((wxWindow*)child, 1, wxEXPAND);
SetSizer(sizer);
SetAutoLayout(TRUE);
Layout();
}
wxString wxDllWidget::GetDllExt()
{
return wxDllLoader::GetDllExt();
}
typedef WXDLLEXPORT bool (*DLL_WidgetFactory_t)(const wxString& className,
wxWindow *parent,
long style,
wxWindow **classInst,
wxSendCommandFunc *cmdFunc);
bool wxDllWidget::LoadWidget(const wxString& dll, const wxString& className,
long style)
{
UnloadWidget();
// Load the dynamic library
m_lib = new wxDynamicLibrary(dll);
if ( !m_lib->IsLoaded() )
{
delete m_lib;
m_lib = NULL;
return FALSE;
}
DLL_WidgetFactory_t factory;
factory = (DLL_WidgetFactory_t) m_lib->GetSymbol(wxT("DLL_WidgetFactory"));
if ( factory == NULL)
{
delete m_lib;
m_lib = NULL;
return FALSE;
}
if ( !factory(className, this, style, &m_widget, &m_cmdFunc) )
{
delete m_widget;
delete m_lib;
m_lib = NULL;
m_widget = NULL;
return FALSE;
}
return TRUE;
}
void wxDllWidget::UnloadWidget()
{
if ( m_widget )
{
DestroyChildren();
m_widget = NULL;
delete m_lib;
m_lib = NULL;
}
}
int wxDllWidget::SendCommand(int cmd, const wxString& param)
{
wxASSERT_MSG( m_widget && m_cmdFunc, wxT("Sending command to not loaded widget!"));
return m_cmdFunc(m_widget, cmd, param);
}

View File

@@ -1,143 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dllwidget.h
// Purpose: Dynamically loadable C++ widget for wxPython
// Author: Vaclav Slavik
// Created: 2001/12/03
// RCS-ID: $Id$
// Copyright: (c) 2001 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma interface "dllwidget.h"
#endif
#ifndef __DLLWIDGET_H__
#define __DLLWIDGET_H__
#include "wx/panel.h"
/*
wxDllWidget can be used to embed a wxWindow implemented in C++ in your
wxPython application without the need to write a SWIG interface. Widget's code
is stored in shared library or DLL that exports DLL_WidgetFactory symbol
and loaded at runtime. All you have to do is to pass the name of DLL and the class
to create to wxDllWidget's ctor.
Runtime-loadable widget must have HandleCommand method (see the example) that is
used to communicate with Python app. You call wxDllWidget.SendCommand(cmd,param) from
Python and it in turn calls HandleCommand of the loaded widget.
You must use DECLARE_DLL_WIDGET, BEGIN_WIDGET_LIBRARY, END_WIDGET_LIBRARY and
REGISTER_WIDGET macros in your C++ module in order to provide all the meat
wxDllWidget needs.
Example of use:
#define CMD_MAKEWHITE 1
class MyWindow : public wxWindow
{
public:
MyWindow(wxWindow *parent, long style)
: wxWindow(parent, -1) {}
int HandleCommand(int cmd, const wxString& param)
{
if (cmd == CMD_MAKEWHITE)
SetBackgroundColour(*wxWHITE);
return 0;
}
};
DECLARE_DLL_WIDGET(MyWindow)
class MyCanvasWindow : public wxScrolledWindow
{
...
};
DECLARE_DLL_WIDGET(MyCanvasWindow)
BEGIN_WIDGET_LIBRARY()
REGISTER_WIDGET(MyWindow)
REGISTER_WIDGET(MyCanvasWindow)
END_WIDGET_LIBRARY()
*/
class WXDLLEXPORT wxDynamicLibrary;
typedef int (*wxSendCommandFunc)(wxWindow *wnd, int cmd, const wxString& param);
class wxDllWidget : public wxPanel
{
public:
wxDllWidget(wxWindow *parent,
wxWindowID id = -1,
const wxString& dllName = wxEmptyString,
const wxString& className = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
virtual ~wxDllWidget();
bool Ok() { return m_widget != NULL; }
virtual int SendCommand(int cmd, const wxString& param = wxEmptyString);
virtual wxWindow* GetWidgetWindow() { return m_widget; }
virtual void AddChild(wxWindowBase *child);
static wxString GetDllExt();
protected:
bool LoadWidget(const wxString& dll, const wxString& className, long style);
void UnloadWidget();
protected:
wxWindow* m_widget;
wxSendCommandFunc m_cmdFunc;
wxDynamicLibrary* m_lib;
bool m_controlAdded;
private:
DECLARE_ABSTRACT_CLASS(wxDllWidget)
};
#define DECLARE_DLL_WIDGET(widget) \
static int SendCommandTo##widget(wxWindow *wnd, int cmd, const wxString& param) \
{ \
return wxStaticCast(wnd, widget)->HandleCommand(cmd, param); \
}
#define BEGIN_WIDGET_LIBRARY() \
extern "C" WXEXPORT bool DLL_WidgetFactory( \
const wxString& className, \
wxWindow *parent, \
long style, \
wxWindow **classInst, \
wxSendCommandFunc *cmdFunc) \
{ \
wxClassInfo::CleanUpClasses(); \
wxClassInfo::InitializeClasses();
#define REGISTER_WIDGET(widget) \
if ( className == wxT(#widget) ) \
{ \
*classInst = new widget(parent, style); \
*cmdFunc = SendCommandTo##widget; \
return TRUE; \
}
#define END_WIDGET_LIBRARY() \
return FALSE; \
}
#endif // __DLLWIDGET_H__

View File

@@ -1,6 +0,0 @@
# The SWIG module is named dllwidget_ to avoid name clashes, so
# this stub just imports everything in it so the friendly module
# name can be used elsewhere.
from dllwidget_ import *

View File

@@ -1,467 +0,0 @@
/*
* FILE : contrib/dllwidget/dllwidget_.cpp
*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
* Version 1.1 (Build 883)
*
* Portions Copyright (c) 1995-1998
* The University of Utah and The Regents of the University of California.
* Permission is granted to distribute this file in any manner provided
* this notice remains intact.
*
* Do not make changes to this file--changes will be lost!
*
*/
#define SWIGCODE
/* Implementation : PYTHON */
#define SWIGPYTHON
#include "Python.h"
#include <string.h>
#include <stdlib.h>
/* 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
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
extern PyObject *SWIG_newvarlink(void);
#ifdef __cplusplus
}
#endif
#define SWIG_init initdllwidget_c
#define SWIG_name "dllwidget_c"
#include "wxPython.h"
#include "dllwidget.h"
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
target = o;
} else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
} 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);
o2 = target;
target = PySequence_Concat(o2, o3);
Py_DECREF(o2);
Py_DECREF(o3);
}
return target;
}
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyEmptyString(wxT(""));
#ifdef __cplusplus
extern "C" {
#endif
static void *SwigwxDllWidgetTowxPanel(void *ptr) {
wxDllWidget *src;
wxPanel *dest;
src = (wxDllWidget *) ptr;
dest = (wxPanel *) src;
return (void *) dest;
}
static void *SwigwxDllWidgetTowxWindow(void *ptr) {
wxDllWidget *src;
wxWindow *dest;
src = (wxDllWidget *) ptr;
dest = (wxWindow *) src;
return (void *) dest;
}
static void *SwigwxDllWidgetTowxEvtHandler(void *ptr) {
wxDllWidget *src;
wxEvtHandler *dest;
src = (wxDllWidget *) ptr;
dest = (wxEvtHandler *) src;
return (void *) dest;
}
static void *SwigwxDllWidgetTowxObject(void *ptr) {
wxDllWidget *src;
wxObject *dest;
src = (wxDllWidget *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxDllWidget(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDllWidget(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_new_wxDllWidget(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxDllWidget * _result;
wxWindow * _arg0;
wxWindowID _arg1 = (wxWindowID ) -1;
wxString * _arg2 = (wxString *) &wxPyEmptyString;
wxString * _arg3 = (wxString *) &wxPyEmptyString;
wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg5 = (wxSize *) &wxDefaultSize;
long _arg6 = (long ) 0;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
PyObject * _obj3 = 0;
wxPoint temp;
PyObject * _obj4 = 0;
wxSize temp0;
PyObject * _obj5 = 0;
char *_kwnames[] = { "parent","id","dllName","className","pos","size","style", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOOOl:new_wxDllWidget",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_obj5,&_arg6))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDllWidget. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj2)
{
_arg2 = wxString_in_helper(_obj2);
if (_arg2 == NULL)
return NULL;
}
if (_obj3)
{
_arg3 = wxString_in_helper(_obj3);
if (_arg3 == NULL)
return NULL;
}
if (_obj4)
{
_arg4 = &temp;
if (! wxPoint_helper(_obj4, &_arg4))
return NULL;
}
if (_obj5)
{
_arg5 = &temp0;
if (! wxSize_helper(_obj5, &_arg5))
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxDllWidget *)new_wxDllWidget(_arg0,_arg1,*_arg2,*_arg3,*_arg4,*_arg5,_arg6);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxDllWidget_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj2)
delete _arg2;
}
{
if (_obj3)
delete _arg3;
}
return _resultobj;
}
#define wxDllWidget_Ok(_swigobj) (_swigobj->Ok())
static PyObject *_wrap_wxDllWidget_Ok(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxDllWidget * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDllWidget_Ok",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_Ok. Expected _wxDllWidget_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxDllWidget_Ok(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxDllWidget_SendCommand(_swigobj,_swigarg0,_swigarg1) (_swigobj->SendCommand(_swigarg0,_swigarg1))
static PyObject *_wrap_wxDllWidget_SendCommand(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
wxDllWidget * _arg0;
int _arg1;
wxString * _arg2 = (wxString *) &wxPyEmptyString;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
char *_kwnames[] = { "self","cmd","param", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxDllWidget_SendCommand",_kwnames,&_argo0,&_arg1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_SendCommand. Expected _wxDllWidget_p.");
return NULL;
}
}
if (_obj2)
{
_arg2 = wxString_in_helper(_obj2);
if (_arg2 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (int )wxDllWidget_SendCommand(_arg0,_arg1,*_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (_obj2)
delete _arg2;
}
return _resultobj;
}
#define wxDllWidget_GetWidgetWindow(_swigobj) (_swigobj->GetWidgetWindow())
static PyObject *_wrap_wxDllWidget_GetWidgetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
wxDllWidget * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDllWidget_GetWidgetWindow",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_GetWidgetWindow. Expected _wxDllWidget_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxWindow *)wxDllWidget_GetWidgetWindow(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
return _resultobj;
}
static PyObject *_wrap_wxDllWidget_GetDllExt(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxString * _result;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDllWidget_GetDllExt",_kwnames))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = new wxString (wxDllWidget::GetDllExt());
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
}
{
delete _result;
}
return _resultobj;
}
static PyMethodDef dllwidget_cMethods[] = {
{ "wxDllWidget_GetDllExt", (PyCFunction) _wrap_wxDllWidget_GetDllExt, METH_VARARGS | METH_KEYWORDS },
{ "wxDllWidget_GetWidgetWindow", (PyCFunction) _wrap_wxDllWidget_GetWidgetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxDllWidget_SendCommand", (PyCFunction) _wrap_wxDllWidget_SendCommand, METH_VARARGS | METH_KEYWORDS },
{ "wxDllWidget_Ok", (PyCFunction) _wrap_wxDllWidget_Ok, METH_VARARGS | METH_KEYWORDS },
{ "new_wxDllWidget", (PyCFunction) _wrap_new_wxDllWidget, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus
}
#endif
/*
* This table is used by the pointer type-checker
*/
static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_signed_long","_long",0},
{ "_wxPrintQuality","_wxCoord",0},
{ "_wxPrintQuality","_int",0},
{ "_wxPrintQuality","_signed_int",0},
{ "_wxPrintQuality","_unsigned_int",0},
{ "_wxPrintQuality","_wxWindowID",0},
{ "_wxPrintQuality","_uint",0},
{ "_wxPrintQuality","_EBool",0},
{ "_wxPrintQuality","_size_t",0},
{ "_wxPrintQuality","_time_t",0},
{ "_byte","_unsigned_char",0},
{ "_long","_unsigned_long",0},
{ "_long","_signed_long",0},
{ "_size_t","_wxCoord",0},
{ "_size_t","_wxPrintQuality",0},
{ "_size_t","_time_t",0},
{ "_size_t","_unsigned_int",0},
{ "_size_t","_int",0},
{ "_size_t","_wxWindowID",0},
{ "_size_t","_uint",0},
{ "_wxPanel","_wxDllWidget",SwigwxDllWidgetTowxPanel},
{ "_uint","_wxCoord",0},
{ "_uint","_wxPrintQuality",0},
{ "_uint","_time_t",0},
{ "_uint","_size_t",0},
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_char","_wxChar",0},
{ "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
{ "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
{ "_signed_int","_wxWindowID",0},
{ "_signed_int","_int",0},
{ "_WXTYPE","_wxDateTime_t",0},
{ "_WXTYPE","_short",0},
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_unsigned_short","_wxDateTime_t",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
{ "_wxObject","_wxDllWidget",SwigwxDllWidgetTowxObject},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_unsigned_char","_byte",0},
{ "_unsigned_int","_wxCoord",0},
{ "_unsigned_int","_wxPrintQuality",0},
{ "_unsigned_int","_time_t",0},
{ "_unsigned_int","_size_t",0},
{ "_unsigned_int","_uint",0},
{ "_unsigned_int","_wxWindowID",0},
{ "_unsigned_int","_int",0},
{ "_short","_wxDateTime_t",0},
{ "_short","_WXTYPE",0},
{ "_short","_unsigned_short",0},
{ "_short","_signed_short",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},
{ "_wxWindowID","_time_t",0},
{ "_wxWindowID","_size_t",0},
{ "_wxWindowID","_EBool",0},
{ "_wxWindowID","_uint",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
{ "_int","_wxCoord",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_time_t",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_int","_uint",0},
{ "_int","_wxWindowID",0},
{ "_int","_unsigned_int",0},
{ "_int","_signed_int",0},
{ "_wxDateTime_t","_unsigned_short",0},
{ "_wxDateTime_t","_short",0},
{ "_wxDateTime_t","_WXTYPE",0},
{ "_time_t","_wxCoord",0},
{ "_time_t","_wxPrintQuality",0},
{ "_time_t","_unsigned_int",0},
{ "_time_t","_int",0},
{ "_time_t","_wxWindowID",0},
{ "_time_t","_uint",0},
{ "_time_t","_size_t",0},
{ "_wxCoord","_int",0},
{ "_wxCoord","_signed_int",0},
{ "_wxCoord","_unsigned_int",0},
{ "_wxCoord","_wxWindowID",0},
{ "_wxCoord","_uint",0},
{ "_wxCoord","_EBool",0},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
{ "_wxEvtHandler","_wxDllWidget",SwigwxDllWidgetTowxEvtHandler},
{ "_wxWindow","_wxDllWidget",SwigwxDllWidgetTowxWindow},
{0,0,0}};
static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT(void) initdllwidget_c() {
PyObject *m, *d;
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("dllwidget_c", dllwidget_cMethods);
d = PyModule_GetDict(m);
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)
SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
}
}

View File

@@ -1,118 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dllwidget_.i
// Purpose: Load wx widgets from external DLLs
//
// Author: Robin Dunn
//
// Created: 04-Dec-2001
// RCS-ID: $Id$
// Copyright: (c) 2001 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module dllwidget_
%{
#include "wxPython.h"
#include "dllwidget.h"
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%extern windows.i
%extern _defs.i
//----------------------------------------------------------------------
%{
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyEmptyString(wxT(""));
%}
//---------------------------------------------------------------------------
/*
wxDllWidget can be used to embed a wxWindow implemented in C++ in your
wxPython application without the need to write a SWIG interface. Widget's code
is stored in shared library or DLL that exports DLL_WidgetFactory symbol
and loaded at runtime. All you have to do is to pass the name of DLL and the class
to create to wxDllWidget's ctor.
Runtime-loadable widget must have HandleCommand method (see the example) that is
used to communicate with Python app. You call wxDllWidget.SendCommand(cmd,param) from
Python and it in turn calls HandleCommand of the loaded widget.
You must use DECLARE_DLL_WIDGET, BEGIN_WIDGET_LIBRARY, END_WIDGET_LIBRARY and
REGISTER_WIDGET macros in your C++ module in order to provide all the meat
wxDllWidget needs.
Example of use:
#define CMD_MAKEWHITE 1
class MyWindow : public wxWindow
{
public:
MyWindow(wxWindow *parent, long style)
: wxWindow(parent, -1) {}
int HandleCommand(int cmd, const wxString& param)
{
if (cmd == CMD_MAKEWHITE)
SetBackgroundColour(*wxWHITE);
return 0;
}
};
DECLARE_DLL_WIDGET(MyWindow)
class MyCanvasWindow : public wxScrolledWindow
{
...
};
DECLARE_DLL_WIDGET(MyCanvasWindow)
BEGIN_WIDGET_LIBRARY()
REGISTER_WIDGET(MyWindow)
REGISTER_WIDGET(MyCanvasWindow)
END_WIDGET_LIBRARY()
*/
class wxDllWidget : public wxPanel
{
public:
wxDllWidget(wxWindow *parent,
wxWindowID id = -1,
const wxString& dllName = wxPyEmptyString,
const wxString& className = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
bool Ok();
int SendCommand(int cmd, const wxString& param = wxPyEmptyString);
wxWindow* GetWidgetWindow();
static wxString GetDllExt();
};
//---------------------------------------------------------------------------
%init %{
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
%}
//---------------------------------------------------------------------------

View File

@@ -1,78 +0,0 @@
# This file was created automatically by SWIG.
import dllwidget_c
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
class wxDllWidgetPtr(wxPanelPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Ok(self, *_args, **_kwargs):
val = apply(dllwidget_c.wxDllWidget_Ok,(self,) + _args, _kwargs)
return val
def SendCommand(self, *_args, **_kwargs):
val = apply(dllwidget_c.wxDllWidget_SendCommand,(self,) + _args, _kwargs)
return val
def GetWidgetWindow(self, *_args, **_kwargs):
val = apply(dllwidget_c.wxDllWidget_GetWidgetWindow,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxDllWidget instance at %s>" % (self.this,)
class wxDllWidget(wxDllWidgetPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(dllwidget_c.new_wxDllWidget,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
#-------------- FUNCTION WRAPPERS ------------------
wxDllWidget_GetDllExt = dllwidget_c.wxDllWidget_GetDllExt
#-------------- VARIABLE WRAPPERS ------------------

View File

@@ -1 +0,0 @@
contrib

View File

@@ -1,12 +0,0 @@
# Stuff these names into the wx namespace so wxPyConstructObject can find them
wx.wxDynamicSashSplitEventPtr = wxDynamicSashSplitEventPtr
wx.wxDynamicSashUnifyEventPtr = wxDynamicSashUnifyEventPtr
wx.wxDynamicSashWindowPtr = wxDynamicSashWindowPtr
wx.wxEditableListBoxPtr = wxEditableListBoxPtr
wx.wxRemotelyScrolledTreeCtrlPtr = wxRemotelyScrolledTreeCtrlPtr
wx.wxTreeCompanionWindowPtr = wxTreeCompanionWindowPtr
wx.wxThinSplitterWindowPtr = wxThinSplitterWindowPtr
wx.wxSplitterScrolledWindowPtr = wxSplitterScrolledWindowPtr

File diff suppressed because it is too large Load Diff

View File

@@ -1,414 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gizmos.i
// Purpose: Wrappers for the "gizmo" classes in wx/contrib
//
// Author: Robin Dunn
//
// Created: 23-Nov-2001
// RCS-ID: $Id$
// Copyright: (c) 2001 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module gizmos
%{
#include "wxPython.h"
#include <wx/gizmos/dynamicsash.h>
#include <wx/gizmos/editlbox.h>
#include <wx/gizmos/splittree.h>
#include <wx/gizmos/ledctrl.h>
#include <wx/listctrl.h>
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%extern windows.i
%extern _defs.i
%extern events.i
%extern controls.i
//----------------------------------------------------------------------
%{
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyDynamicSashNameStr(wxT("dynamicSashWindow"));
static const wxString wxPyEditableListBoxNameStr(wxT("editableListBox"));
%}
///----------------------------------------------------------------------
enum {
wxEVT_DYNAMIC_SASH_SPLIT,
wxEVT_DYNAMIC_SASH_UNIFY,
wxDS_MANAGE_SCROLLBARS,
wxDS_DRAG_CORNER,
};
/*
wxDynamicSashSplitEvents are sent to your view by wxDynamicSashWindow
whenever your view is being split by the user. It is your
responsibility to handle this event by creating a new view window as
a child of the wxDynamicSashWindow. wxDynamicSashWindow will
automatically reparent it to the proper place in its window hierarchy.
*/
class wxDynamicSashSplitEvent : public wxCommandEvent {
public:
wxDynamicSashSplitEvent(wxObject *target);
};
/*
wxDynamicSashUnifyEvents are sent to your view by wxDynamicSashWindow
whenever the sash which splits your view and its sibling is being
reunified such that your view is expanding to replace its sibling.
You needn't do anything with this event if you are allowing
wxDynamicSashWindow to manage your view's scrollbars, but it is useful
if you are managing the scrollbars yourself so that you can keep
the scrollbars' event handlers connected to your view's event handler
class.
*/
class wxDynamicSashUnifyEvent : public wxCommandEvent {
public:
wxDynamicSashUnifyEvent(wxObject *target);
};
/*
wxDynamicSashWindow
wxDynamicSashWindow widgets manages the way other widgets are viewed.
When a wxDynamicSashWindow is first shown, it will contain one child
view, a viewport for that child, and a pair of scrollbars to allow the
user to navigate the child view area. Next to each scrollbar is a small
tab. By clicking on either tab and dragging to the appropriate spot, a
user can split the view area into two smaller views separated by a
draggable sash. Later, when the user wishes to reunify the two subviews,
the user simply drags the sash to the side of the window.
wxDynamicSashWindow will automatically reparent the appropriate child
view back up the window hierarchy, and the wxDynamicSashWindow will have
only one child view once again.
As an application developer, you will simply create a wxDynamicSashWindow
using either the Create() function or the more complex constructor
provided below, and then create a view window whose parent is the
wxDynamicSashWindow. The child should respond to
wxDynamicSashSplitEvents -- perhaps with an OnSplit() event handler -- by
constructing a new view window whose parent is also the
wxDynamicSashWindow. That's it! Now your users can dynamically split
and reunify the view you provided.
If you wish to handle the scrollbar events for your view, rather than
allowing wxDynamicSashWindow to do it for you, things are a bit more
complex. (You might want to handle scrollbar events yourself, if,
for instance, you wish to scroll a subwindow of the view you add to
your wxDynamicSashWindow object, rather than scrolling the whole view.)
In this case, you will need to construct your wxDynamicSashWindow without
the wxDS_MANAGE_SCROLLBARS style and you will need to use the
GetHScrollBar() and GetVScrollBar() methods to retrieve the scrollbar
controls and call SetEventHanler() on them to redirect the scrolling
events whenever your window is reparented by wxDyanmicSashWindow.
You will need to set the scrollbars' event handler at three times:
* When your view is created
* When your view receives a wxDynamicSashSplitEvent
* When your view receives a wxDynamicSashUnifyEvent
See the dynsash_switch sample application for an example which does this.
*/
class wxDynamicSashWindow : public wxWindow {
public:
wxDynamicSashWindow(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER,
const wxString& name = wxPyDynamicSashNameStr);
%name(wxPreDynamicSashWindow)wxDynamicSashWindow();
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER,
const wxString& name = wxPyDynamicSashNameStr);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%pragma(python) addtomethod = "wxPreDynamicSashWindow:val._setOORInfo(val)"
wxScrollBar *GetHScrollBar(const wxWindow *child) const;
wxScrollBar *GetVScrollBar(const wxWindow *child) const;
};
//----------------------------------------------------------------------
// Python functions to act like the event macros
%pragma(python) code = "
def EVT_DYNAMIC_SASH_SPLIT(win, id, func):
win.Connect(id, -1, wxEVT_DYNAMIC_SASH_SPLIT, func)
def EVT_DYNAMIC_SASH_UNIFY(win, id, func):
win.Connect(id, -1, wxEVT_DYNAMIC_SASH_UNIFY, func)
"
//----------------------------------------------------------------------
//----------------------------------------------------------------------
enum {
wxEL_ALLOW_NEW,
wxEL_ALLOW_EDIT,
wxEL_ALLOW_DELETE,
};
// This class provides a composite control that lets the
// user easily enter list of strings
class wxEditableListBox : public wxPanel
{
public:
wxEditableListBox(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE,
const wxString& name = wxPyEditableListBoxNameStr);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void SetStrings(const wxArrayString& strings);
//void GetStrings(wxArrayString& strings);
%addmethods {
PyObject* GetStrings() {
wxArrayString strings;
self->GetStrings(strings);
return wxArrayString2PyList_helper(strings);
}
}
wxListCtrl* GetListCtrl() { return m_listCtrl; }
wxBitmapButton* GetDelButton() { return m_bDel; }
wxBitmapButton* GetNewButton() { return m_bNew; }
wxBitmapButton* GetUpButton() { return m_bUp; }
wxBitmapButton* GetDownButton() { return m_bDown; }
wxBitmapButton* GetEditButton() { return m_bEdit; }
};
//----------------------------------------------------------------------
/*
* wxRemotelyScrolledTreeCtrl
*
* This tree control disables its vertical scrollbar and catches scroll
* events passed by a scrolled window higher in the hierarchy.
* It also updates the scrolled window vertical scrollbar as appropriate.
*/
%{
typedef wxTreeCtrl wxPyTreeCtrl;
%}
class wxRemotelyScrolledTreeCtrl: public wxPyTreeCtrl
{
public:
wxRemotelyScrolledTreeCtrl(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void HideVScrollbar();
// Adjust the containing wxScrolledWindow's scrollbars appropriately
void AdjustRemoteScrollbars();
// Find the scrolled window that contains this control
wxScrolledWindow* GetScrolledWindow() const;
// Scroll to the given line (in scroll units where each unit is
// the height of an item)
void ScrollToLine(int posHoriz, int posVert);
// The companion window is one which will get notified when certain
// events happen such as node expansion
void SetCompanionWindow(wxWindow* companion);
wxWindow* GetCompanionWindow() const;
};
/*
* wxTreeCompanionWindow
*
* A window displaying values associated with tree control items.
*/
%{
class wxPyTreeCompanionWindow: public wxTreeCompanionWindow
{
public:
wxPyTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0)
: wxTreeCompanionWindow(parent, id, pos, size, style) {}
virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect) {
bool found;
wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
PyObject* dcobj = wxPyMake_wxObject(&dc);
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), FALSE);
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), FALSE);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
Py_DECREF(dcobj);
Py_DECREF(idobj);
Py_DECREF(recobj);
}
wxPyEndBlockThreads();
if (! found)
wxTreeCompanionWindow::DrawItem(dc, id, rect);
}
PYPRIVATE;
};
%}
%name(wxTreeCompanionWindow) class wxPyTreeCompanionWindow: public wxWindow
{
public:
wxPyTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxTreeCompanionWindow)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
wxRemotelyScrolledTreeCtrl* GetTreeCtrl() const;
void SetTreeCtrl(wxRemotelyScrolledTreeCtrl* treeCtrl);
};
/*
* wxThinSplitterWindow
*
* Implements a splitter with a less obvious sash
* than the usual one.
*/
class wxThinSplitterWindow: public wxSplitterWindow
{
public:
wxThinSplitterWindow(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_3D | wxCLIP_CHILDREN);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
/*
* wxSplitterScrolledWindow
*
* This scrolled window is aware of the fact that one of its
* children is a splitter window. It passes on its scroll events
* (after some processing) to both splitter children for them
* scroll appropriately.
*/
class wxSplitterScrolledWindow: public wxScrolledWindow
{
public:
wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
};
//----------------------------------------------------------------------
//----------------------------------------------------------------------
enum wxLEDValueAlign
{
wxLED_ALIGN_LEFT,
wxLED_ALIGN_RIGHT,
wxLED_ALIGN_CENTER,
wxLED_ALIGN_MASK,
wxLED_DRAW_FADED,
};
class wxLEDNumberCtrl : public wxControl
{
public:
// Constructors.
wxLEDNumberCtrl(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLED_ALIGN_LEFT | wxLED_DRAW_FADED);
%name(wxPreLEDNumberCtrl) wxLEDNumberCtrl();
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%pragma(python) addtomethod = "wxPreLEDNumberCtrl:val._setOORInfo(val)"
// Create functions.
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLED_ALIGN_LEFT | wxLED_DRAW_FADED);
wxLEDValueAlign GetAlignment() const { return m_Alignment; }
bool GetDrawFaded() const { return m_DrawFaded; }
const wxString &GetValue() const { return m_Value; }
void SetAlignment(wxLEDValueAlign Alignment, bool Redraw = true);
void SetDrawFaded(bool DrawFaded, bool Redraw = true);
void SetValue(const wxString &Value, bool Redraw = true);
};
//----------------------------------------------------------------------
//----------------------------------------------------------------------
%init %{
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
wxPyPtrTypeMap_Add("wxTreeCompanionWindow", "wxPyTreeCompanionWindow");
%}
%pragma(python) include="_gizmoextras.py";
//----------------------------------------------------------------------
//----------------------------------------------------------------------

View File

@@ -1,318 +0,0 @@
# This file was created automatically by SWIG.
import gizmosc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
def EVT_DYNAMIC_SASH_SPLIT(win, id, func):
win.Connect(id, -1, wxEVT_DYNAMIC_SASH_SPLIT, func)
def EVT_DYNAMIC_SASH_UNIFY(win, id, func):
win.Connect(id, -1, wxEVT_DYNAMIC_SASH_UNIFY, func)
class wxDynamicSashSplitEventPtr(wxCommandEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __repr__(self):
return "<C wxDynamicSashSplitEvent instance at %s>" % (self.this,)
class wxDynamicSashSplitEvent(wxDynamicSashSplitEventPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gizmosc.new_wxDynamicSashSplitEvent,_args,_kwargs)
self.thisown = 1
class wxDynamicSashUnifyEventPtr(wxCommandEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __repr__(self):
return "<C wxDynamicSashUnifyEvent instance at %s>" % (self.this,)
class wxDynamicSashUnifyEvent(wxDynamicSashUnifyEventPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gizmosc.new_wxDynamicSashUnifyEvent,_args,_kwargs)
self.thisown = 1
class wxDynamicSashWindowPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(gizmosc.wxDynamicSashWindow_Create,(self,) + _args, _kwargs)
return val
def GetHScrollBar(self, *_args, **_kwargs):
val = apply(gizmosc.wxDynamicSashWindow_GetHScrollBar,(self,) + _args, _kwargs)
if val: val = wxScrollBarPtr(val)
return val
def GetVScrollBar(self, *_args, **_kwargs):
val = apply(gizmosc.wxDynamicSashWindow_GetVScrollBar,(self,) + _args, _kwargs)
if val: val = wxScrollBarPtr(val)
return val
def __repr__(self):
return "<C wxDynamicSashWindow instance at %s>" % (self.this,)
class wxDynamicSashWindow(wxDynamicSashWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gizmosc.new_wxDynamicSashWindow,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
def wxPreDynamicSashWindow(*_args,**_kwargs):
val = wxDynamicSashWindowPtr(apply(gizmosc.new_wxPreDynamicSashWindow,_args,_kwargs))
val.thisown = 1
val._setOORInfo(val)
return val
class wxEditableListBoxPtr(wxPanelPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def SetStrings(self, *_args, **_kwargs):
val = apply(gizmosc.wxEditableListBox_SetStrings,(self,) + _args, _kwargs)
return val
def GetStrings(self, *_args, **_kwargs):
val = apply(gizmosc.wxEditableListBox_GetStrings,(self,) + _args, _kwargs)
return val
def GetListCtrl(self, *_args, **_kwargs):
val = apply(gizmosc.wxEditableListBox_GetListCtrl,(self,) + _args, _kwargs)
return val
def GetDelButton(self, *_args, **_kwargs):
val = apply(gizmosc.wxEditableListBox_GetDelButton,(self,) + _args, _kwargs)
return val
def GetNewButton(self, *_args, **_kwargs):
val = apply(gizmosc.wxEditableListBox_GetNewButton,(self,) + _args, _kwargs)
return val
def GetUpButton(self, *_args, **_kwargs):
val = apply(gizmosc.wxEditableListBox_GetUpButton,(self,) + _args, _kwargs)
return val
def GetDownButton(self, *_args, **_kwargs):
val = apply(gizmosc.wxEditableListBox_GetDownButton,(self,) + _args, _kwargs)
return val
def GetEditButton(self, *_args, **_kwargs):
val = apply(gizmosc.wxEditableListBox_GetEditButton,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxEditableListBox instance at %s>" % (self.this,)
class wxEditableListBox(wxEditableListBoxPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gizmosc.new_wxEditableListBox,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
class wxRemotelyScrolledTreeCtrlPtr(wxTreeCtrlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def HideVScrollbar(self, *_args, **_kwargs):
val = apply(gizmosc.wxRemotelyScrolledTreeCtrl_HideVScrollbar,(self,) + _args, _kwargs)
return val
def AdjustRemoteScrollbars(self, *_args, **_kwargs):
val = apply(gizmosc.wxRemotelyScrolledTreeCtrl_AdjustRemoteScrollbars,(self,) + _args, _kwargs)
return val
def GetScrolledWindow(self, *_args, **_kwargs):
val = apply(gizmosc.wxRemotelyScrolledTreeCtrl_GetScrolledWindow,(self,) + _args, _kwargs)
if val: val = wxScrolledWindowPtr(val)
return val
def ScrollToLine(self, *_args, **_kwargs):
val = apply(gizmosc.wxRemotelyScrolledTreeCtrl_ScrollToLine,(self,) + _args, _kwargs)
return val
def SetCompanionWindow(self, *_args, **_kwargs):
val = apply(gizmosc.wxRemotelyScrolledTreeCtrl_SetCompanionWindow,(self,) + _args, _kwargs)
return val
def GetCompanionWindow(self, *_args, **_kwargs):
val = apply(gizmosc.wxRemotelyScrolledTreeCtrl_GetCompanionWindow,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxRemotelyScrolledTreeCtrl instance at %s>" % (self.this,)
class wxRemotelyScrolledTreeCtrl(wxRemotelyScrolledTreeCtrlPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gizmosc.new_wxRemotelyScrolledTreeCtrl,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
class wxTreeCompanionWindowPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(gizmosc.wxTreeCompanionWindow__setCallbackInfo,(self,) + _args, _kwargs)
return val
def GetTreeCtrl(self, *_args, **_kwargs):
val = apply(gizmosc.wxTreeCompanionWindow_GetTreeCtrl,(self,) + _args, _kwargs)
if val: val = wxRemotelyScrolledTreeCtrlPtr(val)
return val
def SetTreeCtrl(self, *_args, **_kwargs):
val = apply(gizmosc.wxTreeCompanionWindow_SetTreeCtrl,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxTreeCompanionWindow instance at %s>" % (self.this,)
class wxTreeCompanionWindow(wxTreeCompanionWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gizmosc.new_wxTreeCompanionWindow,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxTreeCompanionWindow)
self._setOORInfo(self)
class wxThinSplitterWindowPtr(wxSplitterWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __repr__(self):
return "<C wxThinSplitterWindow instance at %s>" % (self.this,)
class wxThinSplitterWindow(wxThinSplitterWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gizmosc.new_wxThinSplitterWindow,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
class wxSplitterScrolledWindowPtr(wxScrolledWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __repr__(self):
return "<C wxSplitterScrolledWindow instance at %s>" % (self.this,)
class wxSplitterScrolledWindow(wxSplitterScrolledWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gizmosc.new_wxSplitterScrolledWindow,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
class wxLEDNumberCtrlPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Create(self, *_args, **_kwargs):
val = apply(gizmosc.wxLEDNumberCtrl_Create,(self,) + _args, _kwargs)
return val
def GetAlignment(self, *_args, **_kwargs):
val = apply(gizmosc.wxLEDNumberCtrl_GetAlignment,(self,) + _args, _kwargs)
return val
def GetDrawFaded(self, *_args, **_kwargs):
val = apply(gizmosc.wxLEDNumberCtrl_GetDrawFaded,(self,) + _args, _kwargs)
return val
def GetValue(self, *_args, **_kwargs):
val = apply(gizmosc.wxLEDNumberCtrl_GetValue,(self,) + _args, _kwargs)
return val
def SetAlignment(self, *_args, **_kwargs):
val = apply(gizmosc.wxLEDNumberCtrl_SetAlignment,(self,) + _args, _kwargs)
return val
def SetDrawFaded(self, *_args, **_kwargs):
val = apply(gizmosc.wxLEDNumberCtrl_SetDrawFaded,(self,) + _args, _kwargs)
return val
def SetValue(self, *_args, **_kwargs):
val = apply(gizmosc.wxLEDNumberCtrl_SetValue,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxLEDNumberCtrl instance at %s>" % (self.this,)
class wxLEDNumberCtrl(wxLEDNumberCtrlPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(gizmosc.new_wxLEDNumberCtrl,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
def wxPreLEDNumberCtrl(*_args,**_kwargs):
val = wxLEDNumberCtrlPtr(apply(gizmosc.new_wxPreLEDNumberCtrl,_args,_kwargs))
val.thisown = 1
val._setOORInfo(val)
return val
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------
wxEVT_DYNAMIC_SASH_SPLIT = gizmosc.wxEVT_DYNAMIC_SASH_SPLIT
wxEVT_DYNAMIC_SASH_UNIFY = gizmosc.wxEVT_DYNAMIC_SASH_UNIFY
wxDS_MANAGE_SCROLLBARS = gizmosc.wxDS_MANAGE_SCROLLBARS
wxDS_DRAG_CORNER = gizmosc.wxDS_DRAG_CORNER
wxEL_ALLOW_NEW = gizmosc.wxEL_ALLOW_NEW
wxEL_ALLOW_EDIT = gizmosc.wxEL_ALLOW_EDIT
wxEL_ALLOW_DELETE = gizmosc.wxEL_ALLOW_DELETE
wxLED_ALIGN_LEFT = gizmosc.wxLED_ALIGN_LEFT
wxLED_ALIGN_RIGHT = gizmosc.wxLED_ALIGN_RIGHT
wxLED_ALIGN_CENTER = gizmosc.wxLED_ALIGN_CENTER
wxLED_ALIGN_MASK = gizmosc.wxLED_ALIGN_MASK
wxLED_DRAW_FADED = gizmosc.wxLED_DRAW_FADED
#-------------- USER INCLUDE -----------------------
# Stuff these names into the wx namespace so wxPyConstructObject can find them
wx.wxDynamicSashSplitEventPtr = wxDynamicSashSplitEventPtr
wx.wxDynamicSashUnifyEventPtr = wxDynamicSashUnifyEventPtr
wx.wxDynamicSashWindowPtr = wxDynamicSashWindowPtr
wx.wxEditableListBoxPtr = wxEditableListBoxPtr
wx.wxRemotelyScrolledTreeCtrlPtr = wxRemotelyScrolledTreeCtrlPtr
wx.wxTreeCompanionWindowPtr = wxTreeCompanionWindowPtr
wx.wxThinSplitterWindowPtr = wxThinSplitterWindowPtr
wx.wxSplitterScrolledWindowPtr = wxSplitterScrolledWindowPtr

View File

@@ -1,14 +0,0 @@
*.exp
*.lib
*.obj
*.pch
Makefile
Makefile.pre
Setup
build.local
config.c
glcanvas.h
glcanvasc.ilk
glcanvasc.pyd
sedscript

View File

@@ -1,178 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: glcanvas.i
// Purpose: SWIG definitions for the OpenGL wxWindows classes
//
// Author: Robin Dunn
//
// Created: 15-Mar-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module glcanvas
%{
#include "wxPython.h"
#ifdef __WXMSW__
#include "myglcanvas.h"
#else
#include <wx/glcanvas.h>
#endif
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%extern windows.i
%extern windows2.i
%extern windows3.i
%extern frames.i
%extern _defs.i
%extern misc.i
%extern gdi.i
%extern controls.i
%extern events.i
%pragma(python) code = "import wx"
//----------------------------------------------------------------------
%{
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas"));
static const wxString wxPyEmptyString(wxT(""));
%}
//---------------------------------------------------------------------------
class wxPalette;
class wxWindow;
class wxSize;
class wxPoint;
class wxGLCanvas;
//---------------------------------------------------------------------------
class wxGLContext : public wxObject {
public:
#ifndef __WXMAC__ // fix this?
wxGLContext(bool isRGB, wxGLCanvas *win,
const wxPalette& palette = wxNullPalette);
#endif
~wxGLContext();
void SetCurrent();
void SetColour(const wxString& colour);
void SwapBuffers();
#ifdef __WXGTK__
void SetupPixelFormat();
void SetupPalette(const wxPalette& palette);
wxPalette CreateDefaultPalette();
wxPalette* GetPalette();
#endif
wxWindow* GetWindow();
};
//---------------------------------------------------------------------------
enum {
WX_GL_RGBA, // 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)
};
%typemap(python, in) int *attribList (int *temp) {
int i;
if (PySequence_Check($source)) {
int size = PyObject_Length($source);
temp = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
for (i = 0; i < size; i++) {
temp[i] = PyInt_AsLong(PySequence_GetItem($source, i));
}
temp[size] = 0;
$target = temp;
}
}
%typemap(python, freearg) int *attribList
{
delete [] $source;
}
class wxGLCanvas : public wxWindow {
public:
wxGLCanvas(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxPyGLCanvasNameStr,
int *attribList = NULL,
const wxPalette& palette = wxNullPalette);
%name(wxGLCanvasWithContext)
wxGLCanvas( wxWindow *parent,
const wxGLContext *shared = NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyGLCanvasNameStr,
int *attribList = NULL,
const wxPalette& palette = wxNullPalette );
// bool Create(wxWindow *parent, wxWindowID id,
// const wxPoint& pos, const wxSize& size, long style, const wxString& name);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%pragma(python) addtomethod = "wxGLCanvasWithContext:val._setOORInfo(self)"
void SetCurrent();
void SetColour(const wxString& colour);
void SwapBuffers();
wxGLContext* GetContext();
#ifdef __WXMSW__
void SetupPixelFormat(int *attribList = NULL);
void SetupPalette(const wxPalette& palette);
wxPalette CreateDefaultPalette();
wxPalette* GetPalette();
#endif
};
//---------------------------------------------------------------------------
%init %{
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
%}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------

View File

@@ -1,2 +0,0 @@
*~
_glcanvas.cpp

View File

@@ -1,950 +0,0 @@
/*
* FILE : contrib/glcanvas/gtk/glcanvas.cpp
*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
* Version 1.1 (Build 883)
*
* Portions Copyright (c) 1995-1998
* The University of Utah and The Regents of the University of California.
* Permission is granted to distribute this file in any manner provided
* this notice remains intact.
*
* Do not make changes to this file--changes will be lost!
*
*/
#define SWIGCODE
/* Implementation : PYTHON */
#define SWIGPYTHON
#include "Python.h"
#include <string.h>
#include <stdlib.h>
/* 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
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
extern PyObject *SWIG_newvarlink(void);
#ifdef __cplusplus
}
#endif
#define SWIG_init initglcanvasc
#define SWIG_name "glcanvasc"
#include "wxPython.h"
#ifdef __WXMSW__
#include "myglcanvas.h"
#else
#include <wx/glcanvas.h>
#endif
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
target = o;
} else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
} 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);
o2 = target;
target = PySequence_Concat(o2, o3);
Py_DECREF(o2);
Py_DECREF(o3);
}
return target;
}
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas"));
static const wxString wxPyEmptyString(wxT(""));
#ifdef __cplusplus
extern "C" {
#endif
static void *SwigwxGLContextTowxObject(void *ptr) {
wxGLContext *src;
wxObject *dest;
src = (wxGLContext *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _result;
bool _arg0;
wxGLCanvas * _arg1;
wxPalette * _arg2 = (wxPalette *) &wxNullPalette;
int tempbool0;
PyObject * _argo1 = 0;
PyObject * _argo2 = 0;
char *_kwnames[] = { "isRGB","win","palette", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iO|O:new_wxGLContext",_kwnames,&tempbool0,&_argo1,&_argo2))
return NULL;
_arg0 = (bool ) tempbool0;
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p.");
return NULL;
}
}
if (_argo2) {
if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define delete_wxGLContext(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGLContext",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete_wxGLContext(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetCurrent",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SetCurrent(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLContext_SetColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p.");
return NULL;
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SetColour(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SwapBuffers",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SwapBuffers(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_SetupPixelFormat(_swigobj) (_swigobj->SetupPixelFormat())
static PyObject *_wrap_wxGLContext_SetupPixelFormat(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetupPixelFormat",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetupPixelFormat. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SetupPixelFormat(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
static PyObject *_wrap_wxGLContext_SetupPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
wxPalette * _arg1;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "self","palette", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLContext_SetupPalette",_kwnames,&_argo0,&_argo1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetupPalette. Expected _wxGLContext_p.");
return NULL;
}
}
if (_argo1) {
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGLContext_SetupPalette. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SetupPalette(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
static PyObject *_wrap_wxGLContext_CreateDefaultPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPalette * _result;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_CreateDefaultPalette",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_CreateDefaultPalette. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = new wxPalette (wxGLContext_CreateDefaultPalette(_arg0));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPalette_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxGLContext_GetPalette(_swigobj) (_swigobj->GetPalette())
static PyObject *_wrap_wxGLContext_GetPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPalette * _result;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetPalette",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetPalette. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxPalette *)wxGLContext_GetPalette(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxWindow *)wxGLContext_GetWindow(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
return _resultobj;
}
static void *SwigwxGLCanvasTowxWindow(void *ptr) {
wxGLCanvas *src;
wxWindow *dest;
src = (wxGLCanvas *) ptr;
dest = (wxWindow *) src;
return (void *) dest;
}
static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) {
wxGLCanvas *src;
wxEvtHandler *dest;
src = (wxGLCanvas *) ptr;
dest = (wxEvtHandler *) src;
return (void *) dest;
}
static void *SwigwxGLCanvasTowxObject(void *ptr) {
wxGLCanvas *src;
wxObject *dest;
src = (wxGLCanvas *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _result;
wxWindow * _arg0;
wxWindowID _arg1 = (wxWindowID ) -1;
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
long _arg4 = (long ) 0;
wxString * _arg5 = (wxString *) &wxPyGLCanvasNameStr;
int * _arg6 = (int *) NULL;
wxPalette * _arg7 = (wxPalette *) &wxNullPalette;
PyObject * _argo0 = 0;
wxPoint temp;
PyObject * _obj2 = 0;
wxSize temp0;
PyObject * _obj3 = 0;
PyObject * _obj5 = 0;
int * temp1;
PyObject * _obj6 = 0;
PyObject * _argo7 = 0;
char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlOOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5,&_obj6,&_argo7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj2)
{
_arg2 = &temp;
if (! wxPoint_helper(_obj2, &_arg2))
return NULL;
}
if (_obj3)
{
_arg3 = &temp0;
if (! wxSize_helper(_obj3, &_arg3))
return NULL;
}
if (_obj5)
{
_arg5 = wxString_in_helper(_obj5);
if (_arg5 == NULL)
return NULL;
}
if (_obj6)
{
int i;
if (PySequence_Check(_obj6)) {
int size = PyObject_Length(_obj6);
temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
for (i = 0; i < size; i++) {
temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i));
}
temp1[size] = 0;
_arg6 = temp1;
}
}
if (_argo7) {
if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6,*_arg7);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj5)
delete _arg5;
}
{
delete [] _arg6;
}
return _resultobj;
}
#define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _result;
wxWindow * _arg0;
wxGLContext * _arg1 = (wxGLContext *) NULL;
wxWindowID _arg2 = (wxWindowID ) -1;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) 0;
wxString * _arg6 = (wxString *) &wxPyGLCanvasNameStr;
int * _arg7 = (int *) NULL;
wxPalette * _arg8 = (wxPalette *) &wxNullPalette;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
PyObject * _obj6 = 0;
int * temp1;
PyObject * _obj7 = 0;
PyObject * _argo8 = 0;
char *_kwnames[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlOOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6,&_obj7,&_argo8))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
if (_obj6)
{
_arg6 = wxString_in_helper(_obj6);
if (_arg6 == NULL)
return NULL;
}
if (_obj7)
{
int i;
if (PySequence_Check(_obj7)) {
int size = PyObject_Length(_obj7);
temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
for (i = 0; i < size; i++) {
temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj7, i));
}
temp1[size] = 0;
_arg7 = temp1;
}
}
if (_argo8) {
if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7,*_arg8);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj6)
delete _arg6;
}
{
delete [] _arg7;
}
return _resultobj;
}
#define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SetCurrent",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SetCurrent(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLCanvas_SetColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SetColour(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SwapBuffers",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SwapBuffers(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _result;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_GetContext",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLContext *)wxGLCanvas_GetContext(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
static PyMethodDef glcanvascMethods[] = {
{ "wxGLCanvas_GetContext", (PyCFunction) _wrap_wxGLCanvas_GetContext, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SwapBuffers", (PyCFunction) _wrap_wxGLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SetColour", (PyCFunction) _wrap_wxGLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SetCurrent", (PyCFunction) _wrap_wxGLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGLCanvasWithContext", (PyCFunction) _wrap_new_wxGLCanvasWithContext, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGLCanvas", (PyCFunction) _wrap_new_wxGLCanvas, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_GetWindow", (PyCFunction) _wrap_wxGLContext_GetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_GetPalette", (PyCFunction) _wrap_wxGLContext_GetPalette, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_CreateDefaultPalette", (PyCFunction) _wrap_wxGLContext_CreateDefaultPalette, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SetupPalette", (PyCFunction) _wrap_wxGLContext_SetupPalette, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SetupPixelFormat", (PyCFunction) _wrap_wxGLContext_SetupPixelFormat, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SwapBuffers", (PyCFunction) _wrap_wxGLContext_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SetColour", (PyCFunction) _wrap_wxGLContext_SetColour, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SetCurrent", (PyCFunction) _wrap_wxGLContext_SetCurrent, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxGLContext", (PyCFunction) _wrap_delete_wxGLContext, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGLContext", (PyCFunction) _wrap_new_wxGLContext, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus
}
#endif
/*
* This table is used by the pointer type-checker
*/
static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_signed_long","_long",0},
{ "_wxPrintQuality","_wxCoord",0},
{ "_wxPrintQuality","_int",0},
{ "_wxPrintQuality","_signed_int",0},
{ "_wxPrintQuality","_unsigned_int",0},
{ "_wxPrintQuality","_wxWindowID",0},
{ "_wxPrintQuality","_uint",0},
{ "_wxPrintQuality","_EBool",0},
{ "_wxPrintQuality","_size_t",0},
{ "_wxPrintQuality","_time_t",0},
{ "_byte","_unsigned_char",0},
{ "_long","_unsigned_long",0},
{ "_long","_signed_long",0},
{ "_size_t","_wxCoord",0},
{ "_size_t","_wxPrintQuality",0},
{ "_size_t","_time_t",0},
{ "_size_t","_unsigned_int",0},
{ "_size_t","_int",0},
{ "_size_t","_wxWindowID",0},
{ "_size_t","_uint",0},
{ "_uint","_wxCoord",0},
{ "_uint","_wxPrintQuality",0},
{ "_uint","_time_t",0},
{ "_uint","_size_t",0},
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_char","_wxChar",0},
{ "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
{ "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
{ "_signed_int","_wxWindowID",0},
{ "_signed_int","_int",0},
{ "_WXTYPE","_wxDateTime_t",0},
{ "_WXTYPE","_short",0},
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_unsigned_short","_wxDateTime_t",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
{ "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject},
{ "_wxObject","_wxGLContext",SwigwxGLContextTowxObject},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_unsigned_char","_byte",0},
{ "_unsigned_int","_wxCoord",0},
{ "_unsigned_int","_wxPrintQuality",0},
{ "_unsigned_int","_time_t",0},
{ "_unsigned_int","_size_t",0},
{ "_unsigned_int","_uint",0},
{ "_unsigned_int","_wxWindowID",0},
{ "_unsigned_int","_int",0},
{ "_short","_wxDateTime_t",0},
{ "_short","_WXTYPE",0},
{ "_short","_unsigned_short",0},
{ "_short","_signed_short",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},
{ "_wxWindowID","_time_t",0},
{ "_wxWindowID","_size_t",0},
{ "_wxWindowID","_EBool",0},
{ "_wxWindowID","_uint",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
{ "_int","_wxCoord",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_time_t",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_int","_uint",0},
{ "_int","_wxWindowID",0},
{ "_int","_unsigned_int",0},
{ "_int","_signed_int",0},
{ "_wxDateTime_t","_unsigned_short",0},
{ "_wxDateTime_t","_short",0},
{ "_wxDateTime_t","_WXTYPE",0},
{ "_time_t","_wxCoord",0},
{ "_time_t","_wxPrintQuality",0},
{ "_time_t","_unsigned_int",0},
{ "_time_t","_int",0},
{ "_time_t","_wxWindowID",0},
{ "_time_t","_uint",0},
{ "_time_t","_size_t",0},
{ "_wxCoord","_int",0},
{ "_wxCoord","_signed_int",0},
{ "_wxCoord","_unsigned_int",0},
{ "_wxCoord","_wxWindowID",0},
{ "_wxCoord","_uint",0},
{ "_wxCoord","_EBool",0},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
{ "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler},
{ "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow},
{0,0,0}};
static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT(void) initglcanvasc() {
PyObject *m, *d;
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("glcanvasc", glcanvascMethods);
d = PyModule_GetDict(m);
PyDict_SetItemString(d,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA));
PyDict_SetItemString(d,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE));
PyDict_SetItemString(d,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL));
PyDict_SetItemString(d,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER));
PyDict_SetItemString(d,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO));
PyDict_SetItemString(d,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS));
PyDict_SetItemString(d,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED));
PyDict_SetItemString(d,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN));
PyDict_SetItemString(d,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE));
PyDict_SetItemString(d,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA));
PyDict_SetItemString(d,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE));
PyDict_SetItemString(d,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA));
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)
SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
}
}

View File

@@ -1,149 +0,0 @@
# This file was created automatically by SWIG.
import glcanvasc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
import wx
class wxGLContextPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self, delfunc=glcanvasc.delete_wxGLContext):
if self.thisown == 1:
try:
delfunc(self)
except:
pass
def SetCurrent(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SetCurrent,(self,) + _args, _kwargs)
return val
def SetColour(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SetColour,(self,) + _args, _kwargs)
return val
def SwapBuffers(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SwapBuffers,(self,) + _args, _kwargs)
return val
def SetupPixelFormat(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SetupPixelFormat,(self,) + _args, _kwargs)
return val
def SetupPalette(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SetupPalette,(self,) + _args, _kwargs)
return val
def CreateDefaultPalette(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_CreateDefaultPalette,(self,) + _args, _kwargs)
if val: val = wxPalettePtr(val) ; val.thisown = 1
return val
def GetPalette(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_GetPalette,(self,) + _args, _kwargs)
if val: val = wxPalettePtr(val)
return val
def GetWindow(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_GetWindow,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxGLContext instance at %s>" % (self.this,)
class wxGLContext(wxGLContextPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(glcanvasc.new_wxGLContext,_args,_kwargs)
self.thisown = 1
class wxGLCanvasPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def SetCurrent(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SetCurrent,(self,) + _args, _kwargs)
return val
def SetColour(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SetColour,(self,) + _args, _kwargs)
return val
def SwapBuffers(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SwapBuffers,(self,) + _args, _kwargs)
return val
def GetContext(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_GetContext,(self,) + _args, _kwargs)
if val: val = wxGLContextPtr(val)
return val
def __repr__(self):
return "<C wxGLCanvas instance at %s>" % (self.this,)
class wxGLCanvas(wxGLCanvasPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(glcanvasc.new_wxGLCanvas,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
def wxGLCanvasWithContext(*_args,**_kwargs):
val = wxGLCanvasPtr(apply(glcanvasc.new_wxGLCanvasWithContext,_args,_kwargs))
val.thisown = 1
val._setOORInfo(self)
return val
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------
WX_GL_RGBA = glcanvasc.WX_GL_RGBA
WX_GL_BUFFER_SIZE = glcanvasc.WX_GL_BUFFER_SIZE
WX_GL_LEVEL = glcanvasc.WX_GL_LEVEL
WX_GL_DOUBLEBUFFER = glcanvasc.WX_GL_DOUBLEBUFFER
WX_GL_STEREO = glcanvasc.WX_GL_STEREO
WX_GL_AUX_BUFFERS = glcanvasc.WX_GL_AUX_BUFFERS
WX_GL_MIN_RED = glcanvasc.WX_GL_MIN_RED
WX_GL_MIN_GREEN = glcanvasc.WX_GL_MIN_GREEN
WX_GL_MIN_BLUE = glcanvasc.WX_GL_MIN_BLUE
WX_GL_MIN_ALPHA = glcanvasc.WX_GL_MIN_ALPHA
WX_GL_DEPTH_SIZE = glcanvasc.WX_GL_DEPTH_SIZE
WX_GL_STENCIL_SIZE = glcanvasc.WX_GL_STENCIL_SIZE
WX_GL_MIN_ACCUM_RED = glcanvasc.WX_GL_MIN_ACCUM_RED
WX_GL_MIN_ACCUM_GREEN = glcanvasc.WX_GL_MIN_ACCUM_GREEN
WX_GL_MIN_ACCUM_BLUE = glcanvasc.WX_GL_MIN_ACCUM_BLUE
WX_GL_MIN_ACCUM_ALPHA = glcanvasc.WX_GL_MIN_ACCUM_ALPHA

View File

@@ -1,770 +0,0 @@
/*
* FILE : contrib/glcanvas/mac/glcanvas.cpp
*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
* Version 1.1 (Build 883)
*
* Portions Copyright (c) 1995-1998
* The University of Utah and The Regents of the University of California.
* Permission is granted to distribute this file in any manner provided
* this notice remains intact.
*
* Do not make changes to this file--changes will be lost!
*
*/
#define SWIGCODE
/* Implementation : PYTHON */
#define SWIGPYTHON
#include "Python.h"
#include <string.h>
#include <stdlib.h>
/* 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
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
extern PyObject *SWIG_newvarlink(void);
#ifdef __cplusplus
}
#endif
#define SWIG_init initglcanvasc
#define SWIG_name "glcanvasc"
#include "wxPython.h"
#ifdef __WXMSW__
#include "myglcanvas.h"
#else
#include <wx/glcanvas.h>
#endif
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
target = o;
} else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
} 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);
o2 = target;
target = PySequence_Concat(o2, o3);
Py_DECREF(o2);
Py_DECREF(o3);
}
return target;
}
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas"));
static const wxString wxPyEmptyString(wxT(""));
#ifdef __cplusplus
extern "C" {
#endif
static void *SwigwxGLContextTowxObject(void *ptr) {
wxGLContext *src;
wxObject *dest;
src = (wxGLContext *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define delete_wxGLContext(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGLContext",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete_wxGLContext(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetCurrent",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SetCurrent(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLContext_SetColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p.");
return NULL;
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SetColour(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SwapBuffers",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SwapBuffers(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxWindow *)wxGLContext_GetWindow(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
return _resultobj;
}
static void *SwigwxGLCanvasTowxWindow(void *ptr) {
wxGLCanvas *src;
wxWindow *dest;
src = (wxGLCanvas *) ptr;
dest = (wxWindow *) src;
return (void *) dest;
}
static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) {
wxGLCanvas *src;
wxEvtHandler *dest;
src = (wxGLCanvas *) ptr;
dest = (wxEvtHandler *) src;
return (void *) dest;
}
static void *SwigwxGLCanvasTowxObject(void *ptr) {
wxGLCanvas *src;
wxObject *dest;
src = (wxGLCanvas *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _result;
wxWindow * _arg0;
wxWindowID _arg1 = (wxWindowID ) -1;
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
long _arg4 = (long ) 0;
wxString * _arg5 = (wxString *) &wxPyGLCanvasNameStr;
int * _arg6 = (int *) NULL;
wxPalette * _arg7 = (wxPalette *) &wxNullPalette;
PyObject * _argo0 = 0;
wxPoint temp;
PyObject * _obj2 = 0;
wxSize temp0;
PyObject * _obj3 = 0;
PyObject * _obj5 = 0;
int * temp1;
PyObject * _obj6 = 0;
PyObject * _argo7 = 0;
char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlOOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5,&_obj6,&_argo7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj2)
{
_arg2 = &temp;
if (! wxPoint_helper(_obj2, &_arg2))
return NULL;
}
if (_obj3)
{
_arg3 = &temp0;
if (! wxSize_helper(_obj3, &_arg3))
return NULL;
}
if (_obj5)
{
_arg5 = wxString_in_helper(_obj5);
if (_arg5 == NULL)
return NULL;
}
if (_obj6)
{
int i;
if (PySequence_Check(_obj6)) {
int size = PyObject_Length(_obj6);
temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
for (i = 0; i < size; i++) {
temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i));
}
temp1[size] = 0;
_arg6 = temp1;
}
}
if (_argo7) {
if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6,*_arg7);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj5)
delete _arg5;
}
{
delete [] _arg6;
}
return _resultobj;
}
#define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _result;
wxWindow * _arg0;
wxGLContext * _arg1 = (wxGLContext *) NULL;
wxWindowID _arg2 = (wxWindowID ) -1;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) 0;
wxString * _arg6 = (wxString *) &wxPyGLCanvasNameStr;
int * _arg7 = (int *) NULL;
wxPalette * _arg8 = (wxPalette *) &wxNullPalette;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
PyObject * _obj6 = 0;
int * temp1;
PyObject * _obj7 = 0;
PyObject * _argo8 = 0;
char *_kwnames[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlOOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6,&_obj7,&_argo8))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
if (_obj6)
{
_arg6 = wxString_in_helper(_obj6);
if (_arg6 == NULL)
return NULL;
}
if (_obj7)
{
int i;
if (PySequence_Check(_obj7)) {
int size = PyObject_Length(_obj7);
temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
for (i = 0; i < size; i++) {
temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj7, i));
}
temp1[size] = 0;
_arg7 = temp1;
}
}
if (_argo8) {
if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7,*_arg8);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj6)
delete _arg6;
}
{
delete [] _arg7;
}
return _resultobj;
}
#define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SetCurrent",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SetCurrent(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLCanvas_SetColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SetColour(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SwapBuffers",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SwapBuffers(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _result;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_GetContext",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLContext *)wxGLCanvas_GetContext(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
static PyMethodDef glcanvascMethods[] = {
{ "wxGLCanvas_GetContext", (PyCFunction) _wrap_wxGLCanvas_GetContext, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SwapBuffers", (PyCFunction) _wrap_wxGLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SetColour", (PyCFunction) _wrap_wxGLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SetCurrent", (PyCFunction) _wrap_wxGLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGLCanvasWithContext", (PyCFunction) _wrap_new_wxGLCanvasWithContext, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGLCanvas", (PyCFunction) _wrap_new_wxGLCanvas, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_GetWindow", (PyCFunction) _wrap_wxGLContext_GetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SwapBuffers", (PyCFunction) _wrap_wxGLContext_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SetColour", (PyCFunction) _wrap_wxGLContext_SetColour, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SetCurrent", (PyCFunction) _wrap_wxGLContext_SetCurrent, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxGLContext", (PyCFunction) _wrap_delete_wxGLContext, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus
}
#endif
/*
* This table is used by the pointer type-checker
*/
static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_signed_long","_long",0},
{ "_wxPrintQuality","_wxCoord",0},
{ "_wxPrintQuality","_int",0},
{ "_wxPrintQuality","_signed_int",0},
{ "_wxPrintQuality","_unsigned_int",0},
{ "_wxPrintQuality","_wxWindowID",0},
{ "_wxPrintQuality","_uint",0},
{ "_wxPrintQuality","_EBool",0},
{ "_wxPrintQuality","_size_t",0},
{ "_wxPrintQuality","_time_t",0},
{ "_byte","_unsigned_char",0},
{ "_long","_unsigned_long",0},
{ "_long","_signed_long",0},
{ "_size_t","_wxCoord",0},
{ "_size_t","_wxPrintQuality",0},
{ "_size_t","_time_t",0},
{ "_size_t","_unsigned_int",0},
{ "_size_t","_int",0},
{ "_size_t","_wxWindowID",0},
{ "_size_t","_uint",0},
{ "_uint","_wxCoord",0},
{ "_uint","_wxPrintQuality",0},
{ "_uint","_time_t",0},
{ "_uint","_size_t",0},
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_char","_wxChar",0},
{ "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
{ "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
{ "_signed_int","_wxWindowID",0},
{ "_signed_int","_int",0},
{ "_WXTYPE","_wxDateTime_t",0},
{ "_WXTYPE","_short",0},
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_unsigned_short","_wxDateTime_t",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
{ "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject},
{ "_wxObject","_wxGLContext",SwigwxGLContextTowxObject},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_unsigned_char","_byte",0},
{ "_unsigned_int","_wxCoord",0},
{ "_unsigned_int","_wxPrintQuality",0},
{ "_unsigned_int","_time_t",0},
{ "_unsigned_int","_size_t",0},
{ "_unsigned_int","_uint",0},
{ "_unsigned_int","_wxWindowID",0},
{ "_unsigned_int","_int",0},
{ "_short","_wxDateTime_t",0},
{ "_short","_WXTYPE",0},
{ "_short","_unsigned_short",0},
{ "_short","_signed_short",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},
{ "_wxWindowID","_time_t",0},
{ "_wxWindowID","_size_t",0},
{ "_wxWindowID","_EBool",0},
{ "_wxWindowID","_uint",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
{ "_int","_wxCoord",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_time_t",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_int","_uint",0},
{ "_int","_wxWindowID",0},
{ "_int","_unsigned_int",0},
{ "_int","_signed_int",0},
{ "_wxDateTime_t","_unsigned_short",0},
{ "_wxDateTime_t","_short",0},
{ "_wxDateTime_t","_WXTYPE",0},
{ "_time_t","_wxCoord",0},
{ "_time_t","_wxPrintQuality",0},
{ "_time_t","_unsigned_int",0},
{ "_time_t","_int",0},
{ "_time_t","_wxWindowID",0},
{ "_time_t","_uint",0},
{ "_time_t","_size_t",0},
{ "_wxCoord","_int",0},
{ "_wxCoord","_signed_int",0},
{ "_wxCoord","_unsigned_int",0},
{ "_wxCoord","_wxWindowID",0},
{ "_wxCoord","_uint",0},
{ "_wxCoord","_EBool",0},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
{ "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler},
{ "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow},
{0,0,0}};
static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT(void) initglcanvasc() {
PyObject *m, *d;
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("glcanvasc", glcanvascMethods);
d = PyModule_GetDict(m);
PyDict_SetItemString(d,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA));
PyDict_SetItemString(d,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE));
PyDict_SetItemString(d,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL));
PyDict_SetItemString(d,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER));
PyDict_SetItemString(d,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO));
PyDict_SetItemString(d,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS));
PyDict_SetItemString(d,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED));
PyDict_SetItemString(d,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN));
PyDict_SetItemString(d,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE));
PyDict_SetItemString(d,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA));
PyDict_SetItemString(d,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE));
PyDict_SetItemString(d,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA));
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)
SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
}
}

View File

@@ -1,134 +0,0 @@
# This file was created automatically by SWIG.
import glcanvasc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
import wx
class wxGLContextPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self, delfunc=glcanvasc.delete_wxGLContext):
if self.thisown == 1:
try:
delfunc(self)
except:
pass
def SetCurrent(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SetCurrent,(self,) + _args, _kwargs)
return val
def SetColour(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SetColour,(self,) + _args, _kwargs)
return val
def SwapBuffers(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SwapBuffers,(self,) + _args, _kwargs)
return val
def GetWindow(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_GetWindow,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxGLContext instance at %s>" % (self.this,)
class wxGLContext(wxGLContextPtr):
def __init__(self,this):
self.this = this
class wxGLCanvasPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def SetCurrent(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SetCurrent,(self,) + _args, _kwargs)
return val
def SetColour(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SetColour,(self,) + _args, _kwargs)
return val
def SwapBuffers(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SwapBuffers,(self,) + _args, _kwargs)
return val
def GetContext(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_GetContext,(self,) + _args, _kwargs)
if val: val = wxGLContextPtr(val)
return val
def __repr__(self):
return "<C wxGLCanvas instance at %s>" % (self.this,)
class wxGLCanvas(wxGLCanvasPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(glcanvasc.new_wxGLCanvas,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
def wxGLCanvasWithContext(*_args,**_kwargs):
val = wxGLCanvasPtr(apply(glcanvasc.new_wxGLCanvasWithContext,_args,_kwargs))
val.thisown = 1
val._setOORInfo(self)
return val
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------
WX_GL_RGBA = glcanvasc.WX_GL_RGBA
WX_GL_BUFFER_SIZE = glcanvasc.WX_GL_BUFFER_SIZE
WX_GL_LEVEL = glcanvasc.WX_GL_LEVEL
WX_GL_DOUBLEBUFFER = glcanvasc.WX_GL_DOUBLEBUFFER
WX_GL_STEREO = glcanvasc.WX_GL_STEREO
WX_GL_AUX_BUFFERS = glcanvasc.WX_GL_AUX_BUFFERS
WX_GL_MIN_RED = glcanvasc.WX_GL_MIN_RED
WX_GL_MIN_GREEN = glcanvasc.WX_GL_MIN_GREEN
WX_GL_MIN_BLUE = glcanvasc.WX_GL_MIN_BLUE
WX_GL_MIN_ALPHA = glcanvasc.WX_GL_MIN_ALPHA
WX_GL_DEPTH_SIZE = glcanvasc.WX_GL_DEPTH_SIZE
WX_GL_STENCIL_SIZE = glcanvasc.WX_GL_STENCIL_SIZE
WX_GL_MIN_ACCUM_RED = glcanvasc.WX_GL_MIN_ACCUM_RED
WX_GL_MIN_ACCUM_GREEN = glcanvasc.WX_GL_MIN_ACCUM_GREEN
WX_GL_MIN_ACCUM_BLUE = glcanvasc.WX_GL_MIN_ACCUM_BLUE
WX_GL_MIN_ACCUM_ALPHA = glcanvasc.WX_GL_MIN_ACCUM_ALPHA

View File

@@ -1 +0,0 @@
*~

View File

@@ -1,969 +0,0 @@
/*
* FILE : contrib/glcanvas/msw/glcanvas.cpp
*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
* Version 1.1 (Build 883)
*
* Portions Copyright (c) 1995-1998
* The University of Utah and The Regents of the University of California.
* Permission is granted to distribute this file in any manner provided
* this notice remains intact.
*
* Do not make changes to this file--changes will be lost!
*
*/
#define SWIGCODE
/* Implementation : PYTHON */
#define SWIGPYTHON
#include "Python.h"
#include <string.h>
#include <stdlib.h>
/* 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
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
extern PyObject *SWIG_newvarlink(void);
#ifdef __cplusplus
}
#endif
#define SWIG_init initglcanvasc
#define SWIG_name "glcanvasc"
#include "wxPython.h"
#ifdef __WXMSW__
#include "myglcanvas.h"
#else
#include <wx/glcanvas.h>
#endif
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
target = o;
} else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
} 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);
o2 = target;
target = PySequence_Concat(o2, o3);
Py_DECREF(o2);
Py_DECREF(o3);
}
return target;
}
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas"));
static const wxString wxPyEmptyString(wxT(""));
#ifdef __cplusplus
extern "C" {
#endif
static void *SwigwxGLContextTowxObject(void *ptr) {
wxGLContext *src;
wxObject *dest;
src = (wxGLContext *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _result;
bool _arg0;
wxGLCanvas * _arg1;
wxPalette * _arg2 = (wxPalette *) &wxNullPalette;
int tempbool0;
PyObject * _argo1 = 0;
PyObject * _argo2 = 0;
char *_kwnames[] = { "isRGB","win","palette", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iO|O:new_wxGLContext",_kwnames,&tempbool0,&_argo1,&_argo2))
return NULL;
_arg0 = (bool ) tempbool0;
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p.");
return NULL;
}
}
if (_argo2) {
if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define delete_wxGLContext(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGLContext",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
delete_wxGLContext(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetCurrent",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SetCurrent(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLContext_SetColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p.");
return NULL;
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SetColour(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SwapBuffers",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLContext_SwapBuffers(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
wxGLContext * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxWindow *)wxGLContext_GetWindow(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
return _resultobj;
}
static void *SwigwxGLCanvasTowxWindow(void *ptr) {
wxGLCanvas *src;
wxWindow *dest;
src = (wxGLCanvas *) ptr;
dest = (wxWindow *) src;
return (void *) dest;
}
static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) {
wxGLCanvas *src;
wxEvtHandler *dest;
src = (wxGLCanvas *) ptr;
dest = (wxEvtHandler *) src;
return (void *) dest;
}
static void *SwigwxGLCanvasTowxObject(void *ptr) {
wxGLCanvas *src;
wxObject *dest;
src = (wxGLCanvas *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _result;
wxWindow * _arg0;
wxWindowID _arg1 = (wxWindowID ) -1;
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
long _arg4 = (long ) 0;
wxString * _arg5 = (wxString *) &wxPyGLCanvasNameStr;
int * _arg6 = (int *) NULL;
wxPalette * _arg7 = (wxPalette *) &wxNullPalette;
PyObject * _argo0 = 0;
wxPoint temp;
PyObject * _obj2 = 0;
wxSize temp0;
PyObject * _obj3 = 0;
PyObject * _obj5 = 0;
int * temp1;
PyObject * _obj6 = 0;
PyObject * _argo7 = 0;
char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlOOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5,&_obj6,&_argo7))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj2)
{
_arg2 = &temp;
if (! wxPoint_helper(_obj2, &_arg2))
return NULL;
}
if (_obj3)
{
_arg3 = &temp0;
if (! wxSize_helper(_obj3, &_arg3))
return NULL;
}
if (_obj5)
{
_arg5 = wxString_in_helper(_obj5);
if (_arg5 == NULL)
return NULL;
}
if (_obj6)
{
int i;
if (PySequence_Check(_obj6)) {
int size = PyObject_Length(_obj6);
temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
for (i = 0; i < size; i++) {
temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i));
}
temp1[size] = 0;
_arg6 = temp1;
}
}
if (_argo7) {
if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6,*_arg7);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj5)
delete _arg5;
}
{
delete [] _arg6;
}
return _resultobj;
}
#define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _result;
wxWindow * _arg0;
wxGLContext * _arg1 = (wxGLContext *) NULL;
wxWindowID _arg2 = (wxWindowID ) -1;
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
long _arg5 = (long ) 0;
wxString * _arg6 = (wxString *) &wxPyGLCanvasNameStr;
int * _arg7 = (int *) NULL;
wxPalette * _arg8 = (wxPalette *) &wxNullPalette;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
wxPoint temp;
PyObject * _obj3 = 0;
wxSize temp0;
PyObject * _obj4 = 0;
PyObject * _obj6 = 0;
int * temp1;
PyObject * _obj7 = 0;
PyObject * _argo8 = 0;
char *_kwnames[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlOOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6,&_obj7,&_argo8))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLContext_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
return NULL;
}
}
if (_obj3)
{
_arg3 = &temp;
if (! wxPoint_helper(_obj3, &_arg3))
return NULL;
}
if (_obj4)
{
_arg4 = &temp0;
if (! wxSize_helper(_obj4, &_arg4))
return NULL;
}
if (_obj6)
{
_arg6 = wxString_in_helper(_obj6);
if (_arg6 == NULL)
return NULL;
}
if (_obj7)
{
int i;
if (PySequence_Check(_obj7)) {
int size = PyObject_Length(_obj7);
temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
for (i = 0; i < size; i++) {
temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj7, i));
}
temp1[size] = 0;
_arg7 = temp1;
}
}
if (_argo8) {
if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7,*_arg8);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj6)
delete _arg6;
}
{
delete [] _arg7;
}
return _resultobj;
}
#define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SetCurrent",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SetCurrent(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","colour", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLCanvas_SetColour",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SetColour(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SwapBuffers",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SwapBuffers(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLContext * _result;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_GetContext",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxGLContext *)wxGLCanvas_GetContext(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxGLCanvas_SetupPixelFormat(_swigobj,_swigarg0) (_swigobj->SetupPixelFormat(_swigarg0))
static PyObject *_wrap_wxGLCanvas_SetupPixelFormat(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
int * _arg1 = (int *) NULL;
PyObject * _argo0 = 0;
int * temp;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","attribList", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxGLCanvas_SetupPixelFormat",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetupPixelFormat. Expected _wxGLCanvas_p.");
return NULL;
}
}
if (_obj1)
{
int i;
if (PySequence_Check(_obj1)) {
int size = PyObject_Length(_obj1);
temp = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
for (i = 0; i < size; i++) {
temp[i] = PyInt_AsLong(PySequence_GetItem(_obj1, i));
}
temp[size] = 0;
_arg1 = temp;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SetupPixelFormat(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
delete [] _arg1;
}
return _resultobj;
}
#define wxGLCanvas_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
static PyObject *_wrap_wxGLCanvas_SetupPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxGLCanvas * _arg0;
wxPalette * _arg1;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "self","palette", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLCanvas_SetupPalette",_kwnames,&_argo0,&_argo1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetupPalette. Expected _wxGLCanvas_p.");
return NULL;
}
}
if (_argo1) {
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGLCanvas_SetupPalette. Expected _wxPalette_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxGLCanvas_SetupPalette(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxGLCanvas_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
static PyObject *_wrap_wxGLCanvas_CreateDefaultPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPalette * _result;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_CreateDefaultPalette",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_CreateDefaultPalette. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = new wxPalette (wxGLCanvas_CreateDefaultPalette(_arg0));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPalette_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxGLCanvas_GetPalette(_swigobj) (_swigobj->GetPalette())
static PyObject *_wrap_wxGLCanvas_GetPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPalette * _result;
wxGLCanvas * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_GetPalette",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_GetPalette. Expected _wxGLCanvas_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxPalette *)wxGLCanvas_GetPalette(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
static PyMethodDef glcanvascMethods[] = {
{ "wxGLCanvas_GetPalette", (PyCFunction) _wrap_wxGLCanvas_GetPalette, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_CreateDefaultPalette", (PyCFunction) _wrap_wxGLCanvas_CreateDefaultPalette, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SetupPalette", (PyCFunction) _wrap_wxGLCanvas_SetupPalette, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SetupPixelFormat", (PyCFunction) _wrap_wxGLCanvas_SetupPixelFormat, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_GetContext", (PyCFunction) _wrap_wxGLCanvas_GetContext, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SwapBuffers", (PyCFunction) _wrap_wxGLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SetColour", (PyCFunction) _wrap_wxGLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS },
{ "wxGLCanvas_SetCurrent", (PyCFunction) _wrap_wxGLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGLCanvasWithContext", (PyCFunction) _wrap_new_wxGLCanvasWithContext, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGLCanvas", (PyCFunction) _wrap_new_wxGLCanvas, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_GetWindow", (PyCFunction) _wrap_wxGLContext_GetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SwapBuffers", (PyCFunction) _wrap_wxGLContext_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SetColour", (PyCFunction) _wrap_wxGLContext_SetColour, METH_VARARGS | METH_KEYWORDS },
{ "wxGLContext_SetCurrent", (PyCFunction) _wrap_wxGLContext_SetCurrent, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxGLContext", (PyCFunction) _wrap_delete_wxGLContext, METH_VARARGS | METH_KEYWORDS },
{ "new_wxGLContext", (PyCFunction) _wrap_new_wxGLContext, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus
}
#endif
/*
* This table is used by the pointer type-checker
*/
static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_signed_long","_long",0},
{ "_wxPrintQuality","_wxCoord",0},
{ "_wxPrintQuality","_int",0},
{ "_wxPrintQuality","_signed_int",0},
{ "_wxPrintQuality","_unsigned_int",0},
{ "_wxPrintQuality","_wxWindowID",0},
{ "_wxPrintQuality","_uint",0},
{ "_wxPrintQuality","_EBool",0},
{ "_wxPrintQuality","_size_t",0},
{ "_wxPrintQuality","_time_t",0},
{ "_byte","_unsigned_char",0},
{ "_long","_unsigned_long",0},
{ "_long","_signed_long",0},
{ "_size_t","_wxCoord",0},
{ "_size_t","_wxPrintQuality",0},
{ "_size_t","_time_t",0},
{ "_size_t","_unsigned_int",0},
{ "_size_t","_int",0},
{ "_size_t","_wxWindowID",0},
{ "_size_t","_uint",0},
{ "_uint","_wxCoord",0},
{ "_uint","_wxPrintQuality",0},
{ "_uint","_time_t",0},
{ "_uint","_size_t",0},
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_char","_wxChar",0},
{ "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
{ "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
{ "_signed_int","_wxWindowID",0},
{ "_signed_int","_int",0},
{ "_WXTYPE","_wxDateTime_t",0},
{ "_WXTYPE","_short",0},
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_unsigned_short","_wxDateTime_t",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
{ "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject},
{ "_wxObject","_wxGLContext",SwigwxGLContextTowxObject},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_unsigned_char","_byte",0},
{ "_unsigned_int","_wxCoord",0},
{ "_unsigned_int","_wxPrintQuality",0},
{ "_unsigned_int","_time_t",0},
{ "_unsigned_int","_size_t",0},
{ "_unsigned_int","_uint",0},
{ "_unsigned_int","_wxWindowID",0},
{ "_unsigned_int","_int",0},
{ "_short","_wxDateTime_t",0},
{ "_short","_WXTYPE",0},
{ "_short","_unsigned_short",0},
{ "_short","_signed_short",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},
{ "_wxWindowID","_time_t",0},
{ "_wxWindowID","_size_t",0},
{ "_wxWindowID","_EBool",0},
{ "_wxWindowID","_uint",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
{ "_int","_wxCoord",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_time_t",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_int","_uint",0},
{ "_int","_wxWindowID",0},
{ "_int","_unsigned_int",0},
{ "_int","_signed_int",0},
{ "_wxDateTime_t","_unsigned_short",0},
{ "_wxDateTime_t","_short",0},
{ "_wxDateTime_t","_WXTYPE",0},
{ "_time_t","_wxCoord",0},
{ "_time_t","_wxPrintQuality",0},
{ "_time_t","_unsigned_int",0},
{ "_time_t","_int",0},
{ "_time_t","_wxWindowID",0},
{ "_time_t","_uint",0},
{ "_time_t","_size_t",0},
{ "_wxCoord","_int",0},
{ "_wxCoord","_signed_int",0},
{ "_wxCoord","_unsigned_int",0},
{ "_wxCoord","_wxWindowID",0},
{ "_wxCoord","_uint",0},
{ "_wxCoord","_EBool",0},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
{ "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler},
{ "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow},
{0,0,0}};
static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT(void) initglcanvasc() {
PyObject *m, *d;
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("glcanvasc", glcanvascMethods);
d = PyModule_GetDict(m);
PyDict_SetItemString(d,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA));
PyDict_SetItemString(d,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE));
PyDict_SetItemString(d,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL));
PyDict_SetItemString(d,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER));
PyDict_SetItemString(d,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO));
PyDict_SetItemString(d,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS));
PyDict_SetItemString(d,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED));
PyDict_SetItemString(d,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN));
PyDict_SetItemString(d,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE));
PyDict_SetItemString(d,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA));
PyDict_SetItemString(d,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE));
PyDict_SetItemString(d,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE));
PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA));
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)
SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
}
}

View File

@@ -1,149 +0,0 @@
# This file was created automatically by SWIG.
import glcanvasc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
import wx
class wxGLContextPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self, delfunc=glcanvasc.delete_wxGLContext):
if self.thisown == 1:
try:
delfunc(self)
except:
pass
def SetCurrent(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SetCurrent,(self,) + _args, _kwargs)
return val
def SetColour(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SetColour,(self,) + _args, _kwargs)
return val
def SwapBuffers(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SwapBuffers,(self,) + _args, _kwargs)
return val
def GetWindow(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_GetWindow,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxGLContext instance at %s>" % (self.this,)
class wxGLContext(wxGLContextPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(glcanvasc.new_wxGLContext,_args,_kwargs)
self.thisown = 1
class wxGLCanvasPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def SetCurrent(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SetCurrent,(self,) + _args, _kwargs)
return val
def SetColour(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SetColour,(self,) + _args, _kwargs)
return val
def SwapBuffers(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SwapBuffers,(self,) + _args, _kwargs)
return val
def GetContext(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_GetContext,(self,) + _args, _kwargs)
if val: val = wxGLContextPtr(val)
return val
def SetupPixelFormat(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SetupPixelFormat,(self,) + _args, _kwargs)
return val
def SetupPalette(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_SetupPalette,(self,) + _args, _kwargs)
return val
def CreateDefaultPalette(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_CreateDefaultPalette,(self,) + _args, _kwargs)
if val: val = wxPalettePtr(val) ; val.thisown = 1
return val
def GetPalette(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLCanvas_GetPalette,(self,) + _args, _kwargs)
if val: val = wxPalettePtr(val)
return val
def __repr__(self):
return "<C wxGLCanvas instance at %s>" % (self.this,)
class wxGLCanvas(wxGLCanvasPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(glcanvasc.new_wxGLCanvas,_args,_kwargs)
self.thisown = 1
self._setOORInfo(self)
def wxGLCanvasWithContext(*_args,**_kwargs):
val = wxGLCanvasPtr(apply(glcanvasc.new_wxGLCanvasWithContext,_args,_kwargs))
val.thisown = 1
val._setOORInfo(self)
return val
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------
WX_GL_RGBA = glcanvasc.WX_GL_RGBA
WX_GL_BUFFER_SIZE = glcanvasc.WX_GL_BUFFER_SIZE
WX_GL_LEVEL = glcanvasc.WX_GL_LEVEL
WX_GL_DOUBLEBUFFER = glcanvasc.WX_GL_DOUBLEBUFFER
WX_GL_STEREO = glcanvasc.WX_GL_STEREO
WX_GL_AUX_BUFFERS = glcanvasc.WX_GL_AUX_BUFFERS
WX_GL_MIN_RED = glcanvasc.WX_GL_MIN_RED
WX_GL_MIN_GREEN = glcanvasc.WX_GL_MIN_GREEN
WX_GL_MIN_BLUE = glcanvasc.WX_GL_MIN_BLUE
WX_GL_MIN_ALPHA = glcanvasc.WX_GL_MIN_ALPHA
WX_GL_DEPTH_SIZE = glcanvasc.WX_GL_DEPTH_SIZE
WX_GL_STENCIL_SIZE = glcanvasc.WX_GL_STENCIL_SIZE
WX_GL_MIN_ACCUM_RED = glcanvasc.WX_GL_MIN_ACCUM_RED
WX_GL_MIN_ACCUM_GREEN = glcanvasc.WX_GL_MIN_ACCUM_GREEN
WX_GL_MIN_ACCUM_BLUE = glcanvasc.WX_GL_MIN_ACCUM_BLUE
WX_GL_MIN_ACCUM_ALPHA = glcanvasc.WX_GL_MIN_ACCUM_ALPHA

View File

@@ -1,747 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// 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"
#include "wx/settings.h"
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/msw/private.h"
#include "myglcanvas.h"
const wxChar* wxGLCanvasName = wxT("GLcanvas");
static const wxChar *wxGLCanvasClassName = wxT("wxGLCanvasClass");
static const wxChar *wxGLCanvasClassNameNoRedraw = wxT("wxGLCanvasClassNR");
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 wxChar *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, wxWindow)
BEGIN_EVENT_TABLE(wxGLCanvas, wxWindow)
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) : wxWindow()
{
m_glContext = (wxGLContext*) NULL;
bool ret = Create(parent, id, pos, size, style, name);
if ( ret )
{
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
SetFont(wxSystemSettings::GetFont(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 )
: wxWindow()
{
m_glContext = (wxGLContext*) NULL;
bool ret = Create(parent, id, pos, size, style, name);
if ( ret )
{
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
SetFont(wxSystemSettings::GetFont(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 ):
wxWindow()
{
m_glContext = (wxGLContext*) NULL;
bool ret = Create(parent, id, pos, size, style, name);
if ( ret )
{
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
SetFont(wxSystemSettings::GetFont(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)
{
static bool s_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 (!s_registeredGLCanvasClass)
{
WNDCLASS wndclass;
// 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 = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC;
if ( !::RegisterClass(&wndclass) )
{
wxLogLastError(wxT("RegisterClass(wxGLCanvasClass)"));
return FALSE;
}
// Register the GLCanvas class name for windows which don't do full repaint
// on resize
wndclass.lpszClassName = wxGLCanvasClassNameNoRedraw;
wndclass.style &= ~(CS_HREDRAW | CS_VREDRAW);
if ( !::RegisterClass(&wndclass) )
{
wxLogLastError(wxT("RegisterClass(wxGLCanvasClassNameNoRedraw)"));
::UnregisterClass(wxGLCanvasClassName, wxhInstance);
return FALSE;
}
s_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 | 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;
}
return MSWCreate(wxGLCanvasClassName, NULL, pos, size, msflags, exStyle);
}
static void AdjustPFDForAttributes(PIXELFORMATDESCRIPTOR& pfd, int *attribList)
{
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 = (BYTE)PFD_OVERLAY_PLANE;
} else if (attribList[arg] < 0) {
pfd.iLayerType = (BYTE)PFD_UNDERLAY_PLANE;
} else {
pfd.iLayerType = (BYTE)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;
}
}
}
}
void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC)
{
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 */
};
AdjustPFDForAttributes(pfd, attribList);
int pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd);
if (pixelFormat == 0) {
wxLogLastError(_T("ChoosePixelFormat"));
}
else {
if ( !::SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) ) {
wxLogLastError(_T("SetPixelFormat"));
}
}
}
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)
{
}
void wxGLCanvas::SetCurrent()
{
if (m_glContext)
{
m_glContext->SetCurrent();
}
}
void wxGLCanvas::SetColour(const wxChar *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)
{
}
//---------------------------------------------------------------------------
// wxGLApp
//---------------------------------------------------------------------------
IMPLEMENT_CLASS(wxGLApp, wxApp)
bool wxGLApp::InitGLVisual(int *attribList)
{
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 */
};
AdjustPFDForAttributes(pfd, attribList);
// use DC for whole (root) screen, since no windows have yet been created
pixelFormat = ChoosePixelFormat(ScreenHDC(), &pfd);
if (pixelFormat == 0) {
wxLogError(_("Failed to initialize OpenGL"));
return FALSE;
}
return TRUE;
}
wxGLApp::~wxGLApp()
{
}
#endif
// wxUSE_GLCANVAS

View File

@@ -1,162 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// 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
#include <wx/palette.h>
#include <wx/scrolwin.h>
#include <windows.h>
#include "wx/msw/winundef.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 wxChar *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;
};
extern const wxChar* wxGLCanvasName;
class wxGLCanvas: public wxWindow
{
DECLARE_CLASS(wxGLCanvas)
public:
wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxGLCanvasName, 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 = wxGLCanvasName,
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 = wxGLCanvasName, 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 wxChar *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()
};
class wxGLApp : public wxApp
{
public:
wxGLApp() : wxApp() { }
virtual ~wxGLApp();
// use this in the constructor of the user-derived wxGLApp class to
// determine if an OpenGL rendering context with these attributes
// is available - returns TRUE if so, FALSE if not.
bool InitGLVisual(int *attribList);
private:
DECLARE_DYNAMIC_CLASS(wxGLApp)
};
#endif
// _WX_GLCANVAS_H_

View File

@@ -1,17 +0,0 @@
//----------------------------------------------------------------------
//
// 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

View File

@@ -1 +0,0 @@
orig

View File

@@ -1,585 +0,0 @@
#include "IEHtmlWin.h"
#include <wx/strconv.h>
#include <wx/string.h>
#include <wx/event.h>
#include <wx/listctrl.h>
#include <wx/mstream.h>
#include <oleidl.h>
#include <winerror.h>
#include <exdispid.h>
#include <exdisp.h>
#include <olectl.h>
#include <Mshtml.h>
#include <sstream>
using namespace std;
DEFINE_EVENT_TYPE(wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2);
DEFINE_EVENT_TYPE(wxEVT_COMMAND_MSHTML_NEWWINDOW2);
DEFINE_EVENT_TYPE(wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE);
DEFINE_EVENT_TYPE(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE);
DEFINE_EVENT_TYPE(wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE);
DEFINE_EVENT_TYPE(wxEVT_COMMAND_MSHTML_TITLECHANGE);
IMPLEMENT_DYNAMIC_CLASS(wxMSHTMLEvent, wxNotifyEvent);
//////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE(wxIEHtmlWin, wxActiveX)
END_EVENT_TABLE()
class FS_DWebBrowserEvents2 : public IDispatch
{
private:
DECLARE_OLE_UNKNOWN(FS_DWebBrowserEvents2);
wxIEHtmlWin *m_iewin;
public:
FS_DWebBrowserEvents2(wxIEHtmlWin *iewin) : m_iewin(iewin) {}
virtual ~FS_DWebBrowserEvents2()
{
}
//IDispatch
STDMETHODIMP GetIDsOfNames(REFIID r, OLECHAR** o, unsigned int i, LCID l, DISPID* d)
{
return E_NOTIMPL;
};
STDMETHODIMP GetTypeInfo(unsigned int i, LCID l, ITypeInfo** t)
{
return E_NOTIMPL;
};
STDMETHODIMP GetTypeInfoCount(unsigned int* i)
{
return E_NOTIMPL;
};
void Post(WXTYPE etype, wxString text, long l1 = 0, long l2 = 0)
{
if (! m_iewin || ! m_iewin->GetParent())
return;
wxMSHTMLEvent event;
event.SetId(m_iewin->GetId());
event.SetEventType(etype);
event.m_text1 = text;
event.m_long1 = l1;
event.m_long2 = l2;
m_iewin->GetParent()->AddPendingEvent(event);
};
bool Process(WXTYPE etype, wxString text = wxEmptyString, long l1 = 0, long l2 = 0)
{
if (! m_iewin || ! m_iewin->GetParent())
return true;
wxMSHTMLEvent event;
event.SetId(m_iewin->GetId());
event.SetEventType(etype);
event.m_text1 = text;
event.m_long1 = l1;
event.m_long2 = l2;
m_iewin->GetParent()->ProcessEvent(event);
return event.IsAllowed();
};
wxString GetStrArg(VARIANT& v)
{
VARTYPE vt = v.vt & ~VT_BYREF;
if (vt == VT_VARIANT)
return GetStrArg(*v.pvarVal);
else if (vt == VT_BSTR)
{
if (v.vt & VT_BYREF)
return (v.pbstrVal ? *v.pbstrVal : L"");
else
return v.bstrVal;
}
else
return wxEmptyString;
};
#define STR_ARG(arg) GetStrArg(pDispParams->rgvarg[arg])
#define LONG_ARG(arg)\
(pDispParams->rgvarg[arg].lVal)
STDMETHODIMP Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS * pDispParams,
VARIANT * pVarResult, EXCEPINFO * pExcepInfo,
unsigned int * puArgErr)
{
if (wFlags & DISPATCH_PROPERTYGET)
return E_NOTIMPL;
switch (dispIdMember)
{
case DISPID_BEFORENAVIGATE2:
if (Process(wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, STR_ARG(5)))
*pDispParams->rgvarg->pboolVal = VARIANT_FALSE;
else
*pDispParams->rgvarg->pboolVal = VARIANT_TRUE;
break;
case DISPID_NEWWINDOW2:
if (Process(wxEVT_COMMAND_MSHTML_NEWWINDOW2))
*pDispParams->rgvarg->pboolVal = VARIANT_FALSE;
else
*pDispParams->rgvarg->pboolVal = VARIANT_TRUE;
break;
case DISPID_PROGRESSCHANGE:
Post(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, wxEmptyString, LONG_ARG(1), LONG_ARG(0));
break;
case DISPID_DOCUMENTCOMPLETE:
Post(wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, STR_ARG(0));
break;
case DISPID_STATUSTEXTCHANGE:
Post(wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, STR_ARG(0));
break;
case DISPID_TITLECHANGE:
Post(wxEVT_COMMAND_MSHTML_TITLECHANGE, STR_ARG(0));
break;
}
return S_OK;
}
};
#undef STR_ARG
DEFINE_OLE_TABLE(FS_DWebBrowserEvents2)
OLE_IINTERFACE(IUnknown)
OLE_INTERFACE(DIID_DWebBrowserEvents2, DWebBrowserEvents2)
END_OLE_TABLE;
static const CLSID CLSID_MozillaBrowser =
{ 0x1339B54C, 0x3453, 0x11D2,
{ 0x93, 0xB9, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 } };
//#define PROGID "Shell.Explorer"
#define PROGID CLSID_WebBrowser
//#define PROGID CLSID_MozillaBrowser
//#define PROGID CLSID_HTMLDocument
//#define PROGID "MSCAL.Calendar"
//#define PROGID "WordPad.Document.1"
//#define PROGID "SoftwareFX.ChartFX.20"
wxIEHtmlWin::wxIEHtmlWin(wxWindow * parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name) :
wxActiveX(parent, PROGID, id, pos, size, style, name)
{
SetupBrowser();
}
wxIEHtmlWin::~wxIEHtmlWin()
{
}
void wxIEHtmlWin::SetupBrowser()
{
HRESULT hret;
// Get IWebBrowser2 Interface
hret = m_webBrowser.QueryInterface(IID_IWebBrowser2, m_ActiveX);
assert(SUCCEEDED(hret));
// Web Browser Events
FS_DWebBrowserEvents2 *events = new FS_DWebBrowserEvents2(this);
hret = ConnectAdvise(DIID_DWebBrowserEvents2, events);
if (! SUCCEEDED(hret))
delete events;
// web browser setup
m_webBrowser->put_MenuBar(VARIANT_FALSE);
m_webBrowser->put_AddressBar(VARIANT_FALSE);
m_webBrowser->put_StatusBar(VARIANT_FALSE);
m_webBrowser->put_ToolBar(VARIANT_FALSE);
m_webBrowser->put_RegisterAsBrowser(VARIANT_TRUE);
m_webBrowser->put_RegisterAsDropTarget(VARIANT_TRUE);
m_webBrowser->Navigate( L"about:blank", NULL, NULL, NULL, NULL );
}
void wxIEHtmlWin::SetEditMode(bool seton)
{
m_bAmbientUserMode = ! seton;
AmbientPropertyChanged(DISPID_AMBIENT_USERMODE);
};
bool wxIEHtmlWin::GetEditMode()
{
return ! m_bAmbientUserMode;
};
void wxIEHtmlWin::SetCharset(wxString charset)
{
// HTML Document ?
IDispatch *pDisp = NULL;
HRESULT hret = m_webBrowser->get_Document(&pDisp);
wxAutoOleInterface<IDispatch> disp(pDisp);
if (disp.Ok())
{
wxAutoOleInterface<IHTMLDocument2> doc(IID_IHTMLDocument2, disp);
if (doc.Ok())
doc->put_charset((BSTR) (const wchar_t *) charset.wc_str(wxConvUTF8));
//doc->put_charset((BSTR) wxConvUTF8.cMB2WC(charset).data());
};
};
class IStreamAdaptorBase : public IStream
{
private:
DECLARE_OLE_UNKNOWN(IStreamAdaptorBase);
public:
IStreamAdaptorBase() {}
virtual ~IStreamAdaptorBase() {}
// ISequentialStream
HRESULT STDMETHODCALLTYPE Read(void __RPC_FAR *pv, ULONG cb, ULONG __RPC_FAR *pcbRead) = 0;
HRESULT STDMETHODCALLTYPE Write(const void __RPC_FAR *pv, ULONG cb, ULONG __RPC_FAR *pcbWritten) {return E_NOTIMPL;}
// IStream
HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER __RPC_FAR *plibNewPosition) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER libNewSize) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE CopyTo(IStream __RPC_FAR *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER __RPC_FAR *pcbRead, ULARGE_INTEGER __RPC_FAR *pcbWritten) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE Commit(DWORD grfCommitFlags) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE Revert(void) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE Stat(STATSTG __RPC_FAR *pstatstg, DWORD grfStatFlag) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE Clone(IStream __RPC_FAR *__RPC_FAR *ppstm) {return E_NOTIMPL;}
};
DEFINE_OLE_TABLE(IStreamAdaptorBase)
OLE_IINTERFACE(IUnknown)
OLE_IINTERFACE(ISequentialStream)
OLE_IINTERFACE(IStream)
END_OLE_TABLE;
class IStreamAdaptor : public IStreamAdaptorBase
{
private:
istream *m_is;
public:
IStreamAdaptor(istream *is) : IStreamAdaptorBase(), m_is(is)
{
wxASSERT(m_is != NULL);
}
~IStreamAdaptor()
{
delete m_is;
}
// ISequentialStream
HRESULT STDMETHODCALLTYPE Read(void __RPC_FAR *pv, ULONG cb, ULONG __RPC_FAR *pcbRead)
{
m_is->read((char *) pv, cb);
if (pcbRead)
*pcbRead = m_is->gcount();
return S_OK;
};
};
class IwxStreamAdaptor : public IStreamAdaptorBase
{
private:
wxInputStream *m_is;
public:
IwxStreamAdaptor(wxInputStream *is) : IStreamAdaptorBase(), m_is(is)
{
wxASSERT(m_is != NULL);
}
~IwxStreamAdaptor()
{
delete m_is;
}
// ISequentialStream
HRESULT STDMETHODCALLTYPE Read(void __RPC_FAR *pv, ULONG cb, ULONG __RPC_FAR *pcbRead)
{
m_is->Read((char *) pv, cb);
if (pcbRead)
*pcbRead = m_is->LastRead();
return S_OK;
};
};
void wxIEHtmlWin::LoadUrl(const wxString& url)
{
VARIANTARG navFlag, targetFrame, postData, headers;
navFlag.vt = VT_EMPTY;
navFlag.vt = VT_I2;
navFlag.iVal = navNoReadFromCache;
targetFrame.vt = VT_EMPTY;
postData.vt = VT_EMPTY;
headers.vt = VT_EMPTY;
HRESULT hret = 0;
hret = m_webBrowser->Navigate((BSTR) (const wchar_t *) url.wc_str(wxConvUTF8),
&navFlag, &targetFrame, &postData, &headers);
};
class wxOwnedMemInputStream : public wxMemoryInputStream
{
public:
char *m_data;
wxOwnedMemInputStream(char *data, size_t len) :
wxMemoryInputStream(data, len), m_data(data)
{}
~wxOwnedMemInputStream()
{
free(m_data);
}
};
bool wxIEHtmlWin::LoadString(wxString html)
{
char *data = NULL;
size_t len = html.length();
#ifdef UNICODE
len *= 2;
#endif
data = (char *) malloc(len);
memcpy(data, html.c_str(), len);
return LoadStream(new wxOwnedMemInputStream(data, len));
};
bool wxIEHtmlWin::LoadStream(IStreamAdaptorBase *pstrm)
{
wxAutoOleInterface<IStream> strm(pstrm);
// Document Interface
IDispatch *pDisp = NULL;
HRESULT hret = m_webBrowser->get_Document(&pDisp);
if (! pDisp)
return false;
wxAutoOleInterface<IDispatch> disp(pDisp);
// get IPersistStreamInit
wxAutoOleInterface<IPersistStreamInit>
pPersistStreamInit(IID_IPersistStreamInit, disp);
if (pPersistStreamInit.Ok())
{
HRESULT hr = pPersistStreamInit->InitNew();
if (SUCCEEDED(hr))
hr = pPersistStreamInit->Load(strm);
return SUCCEEDED(hr);
}
else
return false;
};
bool wxIEHtmlWin::LoadStream(istream *is)
{
// wrap reference around stream
IStreamAdaptor *pstrm = new IStreamAdaptor(is);
pstrm->AddRef();
return LoadStream(pstrm);
};
bool wxIEHtmlWin::LoadStream(wxInputStream *is)
{
// wrap reference around stream
IwxStreamAdaptor *pstrm = new IwxStreamAdaptor(is);
pstrm->AddRef();
return LoadStream(pstrm);
};
bool wxIEHtmlWin::GoBack()
{
HRESULT hret = 0;
hret = m_webBrowser->GoBack();
return hret == S_OK;
}
bool wxIEHtmlWin::GoForward()
{
HRESULT hret = 0;
hret = m_webBrowser->GoForward();
return hret == S_OK;
}
bool wxIEHtmlWin::GoHome()
{
HRESULT hret = 0;
hret = m_webBrowser->GoHome();
return hret == S_OK;
}
bool wxIEHtmlWin::GoSearch()
{
HRESULT hret = 0;
hret = m_webBrowser->GoSearch();
return hret == S_OK;
}
bool wxIEHtmlWin::Refresh(wxIEHtmlRefreshLevel level)
{
VARIANTARG levelArg;
HRESULT hret = 0;
levelArg.vt = VT_I2;
levelArg.iVal = level;
hret = m_webBrowser->Refresh2(&levelArg);
return hret == S_OK;
}
bool wxIEHtmlWin::Stop()
{
HRESULT hret = 0;
hret = m_webBrowser->Stop();
return hret == S_OK;
}
///////////////////////////////////////////////////////////////////////////////
static wxAutoOleInterface<IHTMLSelectionObject> GetSelObject(IOleObject *oleObject)
{
// Query for IWebBrowser interface
wxAutoOleInterface<IWebBrowser2> wb(IID_IWebBrowser2, oleObject);
if (! wb.Ok())
return wxAutoOleInterface<IHTMLSelectionObject>();
IDispatch *iDisp = NULL;
HRESULT hr = wb->get_Document(&iDisp);
if (hr != S_OK)
return wxAutoOleInterface<IHTMLSelectionObject>();
// Query for Document Interface
wxAutoOleInterface<IHTMLDocument2> hd(IID_IHTMLDocument2, iDisp);
iDisp->Release();
if (! hd.Ok())
return wxAutoOleInterface<IHTMLSelectionObject>();
IHTMLSelectionObject *_so = NULL;
hr = hd->get_selection(&_so);
// take ownership of selection object
wxAutoOleInterface<IHTMLSelectionObject> so(_so);
return so;
};
static wxAutoOleInterface<IHTMLTxtRange> GetSelRange(IOleObject *oleObject)
{
wxAutoOleInterface<IHTMLTxtRange> tr;
wxAutoOleInterface<IHTMLSelectionObject> so(GetSelObject(oleObject));
if (! so)
return tr;
IDispatch *iDisp = NULL;
HRESULT hr = so->createRange(&iDisp);
if (hr != S_OK)
return tr;
// Query for IHTMLTxtRange interface
tr.QueryInterface(IID_IHTMLTxtRange, iDisp);
iDisp->Release();
return tr;
};
wxString wxIEHtmlWin::GetStringSelection(bool asHTML)
{
wxAutoOleInterface<IHTMLTxtRange> tr(GetSelRange(m_oleObject));
if (! tr)
return wxEmptyString;
BSTR text = NULL;
HRESULT hr = E_FAIL;
if (asHTML)
hr = tr->get_htmlText(&text);
else
hr = tr->get_text(&text);
if (hr != S_OK)
return wxEmptyString;
wxString s = text;
SysFreeString(text);
return s;
};
wxString wxIEHtmlWin::GetText(bool asHTML)
{
if (! m_webBrowser.Ok())
return wxEmptyString;
// get document dispatch interface
IDispatch *iDisp = NULL;
HRESULT hr = m_webBrowser->get_Document(&iDisp);
if (hr != S_OK)
return wxEmptyString;
// Query for Document Interface
wxAutoOleInterface<IHTMLDocument2> hd(IID_IHTMLDocument2, iDisp);
iDisp->Release();
if (! hd.Ok())
return wxEmptyString;
// get body element
IHTMLElement *_body = NULL;
hd->get_body(&_body);
if (! _body)
return wxEmptyString;
wxAutoOleInterface<IHTMLElement> body(_body);
// get inner text
BSTR text = NULL;
hr = E_FAIL;
if (asHTML)
hr = body->get_innerHTML(&text);
else
hr = body->get_innerText(&text);
if (hr != S_OK)
return wxEmptyString;
wxString s = text;
SysFreeString(text);
return s;
};

View File

@@ -1,104 +0,0 @@
#ifndef _IEHTMLWIN_H_
#define _IEHTMLWIN_H_
#pragma warning( disable : 4101 4786)
#pragma warning( disable : 4786)
#include <wx/setup.h>
#include <wx/wx.h>
#include <exdisp.h>
#include <iostream>
using namespace std;
#include "wxactivex.h"
class wxMSHTMLEvent : public wxNotifyEvent
{
public:
wxMSHTMLEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
: wxNotifyEvent(commandType, id)
{}
wxString GetText1() { return m_text1; }
long GetLong1() { return m_long1; }
long GetLong2() { return m_long2; }
wxString m_text1;
long m_long1, m_long2;
virtual wxEvent *Clone() const { return new wxMSHTMLEvent(*this); }
private:
DECLARE_DYNAMIC_CLASS(wxMSHTMLEvent)
};
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, 0)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MSHTML_NEWWINDOW2, 0)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, 0)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, 0)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, 0)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MSHTML_TITLECHANGE, 0)
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxMSHTMLEventFunction)(wxMSHTMLEvent&);
#define EVT_MSHTML_BEFORENAVIGATE2(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMSHTMLEventFunction) & fn, NULL ),
#define EVT_MSHTML_NEWWINDOW2(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_MSHTML_NEWWINDOW2, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMSHTMLEventFunction) & fn, NULL ),
#define EVT_MSHTML_DOCUMENTCOMPLETE(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMSHTMLEventFunction) & fn, NULL ),
#define EVT_MSHTML_PROGRESSCHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMSHTMLEventFunction) & fn, NULL ),
#define EVT_MSHTML_STATUSTEXTCHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMSHTMLEventFunction) & fn, NULL ),
#define EVT_MSHTML_TITLECHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_MSHTML_TITLECHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMSHTMLEventFunction) & fn, NULL ),
enum wxIEHtmlRefreshLevel
{
wxIEHTML_REFRESH_NORMAL = 0,
wxIEHTML_REFRESH_IFEXPIRED = 1,
wxIEHTML_REFRESH_CONTINUE = 2,
wxIEHTML_REFRESH_COMPLETELY = 3
};
class IStreamAdaptorBase;
class wxIEHtmlWin : public wxActiveX
{
public:
wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxIEHtmlWin();
void LoadUrl(const wxString&);
bool LoadString(wxString html);
bool LoadStream(istream *strm);
bool LoadStream(wxInputStream *is);
void SetCharset(wxString charset);
void SetEditMode(bool seton);
bool GetEditMode();
wxString GetStringSelection(bool asHTML = false);
wxString GetText(bool asHTML = false);
bool GoBack();
bool GoForward();
bool GoHome();
bool GoSearch();
bool Refresh(wxIEHtmlRefreshLevel level);
bool Stop();
DECLARE_EVENT_TABLE();
protected:
void SetupBrowser();
bool LoadStream(IStreamAdaptorBase *pstrm);
wxAutoOleInterface<IWebBrowser2> m_webBrowser;
};
#endif /* _IEHTMLWIN_H_ */

View File

@@ -1,4 +0,0 @@
# Stuff these names into the wx namespace so wxPyConstructObject can find them
wx.wxMSHTMLEventPtr = wxMSHTMLEventPtr
wx.wxIEHtmlWinPtr = wxIEHtmlWinPtr

View File

@@ -1,978 +0,0 @@
/*
* FILE : contrib/iewin/iewin.cpp
*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
* Version 1.1 (Build 883)
*
* Portions Copyright (c) 1995-1998
* The University of Utah and The Regents of the University of California.
* Permission is granted to distribute this file in any manner provided
* this notice remains intact.
*
* Do not make changes to this file--changes will be lost!
*
*/
#define SWIGCODE
/* Implementation : PYTHON */
#define SWIGPYTHON
#include "Python.h"
#include <string.h>
#include <stdlib.h>
/* 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
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
extern PyObject *SWIG_newvarlink(void);
#ifdef __cplusplus
}
#endif
#define SWIG_init initiewinc
#define SWIG_name "iewinc"
#include "wxPython.h"
#include "IEHtmlWin.h"
#include "pyistream.h"
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
target = o;
} else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
} 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);
o2 = target;
target = PySequence_Concat(o2, o3);
Py_DECREF(o2);
Py_DECREF(o3);
}
return target;
}
// Put some wx default wxChar* values into wxStrings.
DECLARE_DEF_STRING(PanelNameStr);
#ifdef __cplusplus
extern "C" {
#endif
static void *SwigwxMSHTMLEventTowxNotifyEvent(void *ptr) {
wxMSHTMLEvent *src;
wxNotifyEvent *dest;
src = (wxMSHTMLEvent *) ptr;
dest = (wxNotifyEvent *) src;
return (void *) dest;
}
static void *SwigwxMSHTMLEventTowxCommandEvent(void *ptr) {
wxMSHTMLEvent *src;
wxCommandEvent *dest;
src = (wxMSHTMLEvent *) ptr;
dest = (wxCommandEvent *) src;
return (void *) dest;
}
static void *SwigwxMSHTMLEventTowxEvent(void *ptr) {
wxMSHTMLEvent *src;
wxEvent *dest;
src = (wxMSHTMLEvent *) ptr;
dest = (wxEvent *) src;
return (void *) dest;
}
static void *SwigwxMSHTMLEventTowxObject(void *ptr) {
wxMSHTMLEvent *src;
wxObject *dest;
src = (wxMSHTMLEvent *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxMSHTMLEvent(_swigarg0,_swigarg1) (new wxMSHTMLEvent(_swigarg0,_swigarg1))
static PyObject *_wrap_new_wxMSHTMLEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMSHTMLEvent * _result;
wxEventType _arg0 = (wxEventType ) wxEVT_NULL;
int _arg1 = (int ) 0;
char *_kwnames[] = { "commandType","id", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxMSHTMLEvent",_kwnames,&_arg0,&_arg1))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxMSHTMLEvent *)new_wxMSHTMLEvent(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxMSHTMLEvent_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxMSHTMLEvent_GetText1(_swigobj) (_swigobj->GetText1())
static PyObject *_wrap_wxMSHTMLEvent_GetText1(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxString * _result;
wxMSHTMLEvent * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMSHTMLEvent_GetText1",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMSHTMLEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMSHTMLEvent_GetText1. Expected _wxMSHTMLEvent_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = new wxString (wxMSHTMLEvent_GetText1(_arg0));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
}
{
delete _result;
}
return _resultobj;
}
#define wxMSHTMLEvent_GetLong1(_swigobj) (_swigobj->GetLong1())
static PyObject *_wrap_wxMSHTMLEvent_GetLong1(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
long _result;
wxMSHTMLEvent * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMSHTMLEvent_GetLong1",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMSHTMLEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMSHTMLEvent_GetLong1. Expected _wxMSHTMLEvent_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (long )wxMSHTMLEvent_GetLong1(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("l",_result);
return _resultobj;
}
#define wxMSHTMLEvent_GetLong2(_swigobj) (_swigobj->GetLong2())
static PyObject *_wrap_wxMSHTMLEvent_GetLong2(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
long _result;
wxMSHTMLEvent * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMSHTMLEvent_GetLong2",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMSHTMLEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMSHTMLEvent_GetLong2. Expected _wxMSHTMLEvent_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (long )wxMSHTMLEvent_GetLong2(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("l",_result);
return _resultobj;
}
static void *SwigwxIEHtmlWinTowxWindow(void *ptr) {
wxIEHtmlWin *src;
wxWindow *dest;
src = (wxIEHtmlWin *) ptr;
dest = (wxWindow *) src;
return (void *) dest;
}
static void *SwigwxIEHtmlWinTowxEvtHandler(void *ptr) {
wxIEHtmlWin *src;
wxEvtHandler *dest;
src = (wxIEHtmlWin *) ptr;
dest = (wxEvtHandler *) src;
return (void *) dest;
}
static void *SwigwxIEHtmlWinTowxObject(void *ptr) {
wxIEHtmlWin *src;
wxObject *dest;
src = (wxIEHtmlWin *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxIEHtmlWin(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxIEHtmlWin(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
static PyObject *_wrap_new_wxIEHtmlWin(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxIEHtmlWin * _result;
wxWindow * _arg0;
wxWindowID _arg1 = (wxWindowID ) -1;
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
long _arg4 = (long ) 0;
wxString * _arg5 = (wxString *) &wxPyPanelNameStr;
PyObject * _argo0 = 0;
wxPoint temp;
PyObject * _obj2 = 0;
wxSize temp0;
PyObject * _obj3 = 0;
PyObject * _obj5 = 0;
char *_kwnames[] = { "parent","id","pos","size","style","name", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlO:new_wxIEHtmlWin",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxIEHtmlWin. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj2)
{
_arg2 = &temp;
if (! wxPoint_helper(_obj2, &_arg2))
return NULL;
}
if (_obj3)
{
_arg3 = &temp0;
if (! wxSize_helper(_obj3, &_arg3))
return NULL;
}
if (_obj5)
{
_arg5 = wxString_in_helper(_obj5);
if (_arg5 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxIEHtmlWin *)new_wxIEHtmlWin(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxIEHtmlWin_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj5)
delete _arg5;
}
return _resultobj;
}
#define wxIEHtmlWin_LoadUrl(_swigobj,_swigarg0) (_swigobj->LoadUrl(_swigarg0))
static PyObject *_wrap_wxIEHtmlWin_LoadUrl(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxIEHtmlWin * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","arg2", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxIEHtmlWin_LoadUrl",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_LoadUrl. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxIEHtmlWin_LoadUrl(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxIEHtmlWin_LoadString(_swigobj,_swigarg0) (_swigobj->LoadString(_swigarg0))
static PyObject *_wrap_wxIEHtmlWin_LoadString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxIEHtmlWin * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","html", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxIEHtmlWin_LoadString",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_LoadString. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxIEHtmlWin_LoadString(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxIEHtmlWin_LoadStream(_swigobj,_swigarg0) (_swigobj->LoadStream(_swigarg0))
static PyObject *_wrap_wxIEHtmlWin_LoadStream(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxIEHtmlWin * _arg0;
wxInputStream * _arg1;
PyObject * _argo0 = 0;
wxPyInputStream * temp;
bool created;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","is", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxIEHtmlWin_LoadStream",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_LoadStream. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
if (SWIG_GetPtrObj(_obj1, (void **) &temp, "_wxPyInputStream_p") == 0) {
_arg1 = temp->m_wxis;
created = FALSE;
} else {
_arg1 = wxPyCBInputStream_create(_obj1, FALSE);
if (_arg1 == NULL) {
PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
return NULL;
}
created = TRUE;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxIEHtmlWin_LoadStream(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (created)
delete _arg1;
}
return _resultobj;
}
#define wxIEHtmlWin_SetCharset(_swigobj,_swigarg0) (_swigobj->SetCharset(_swigarg0))
static PyObject *_wrap_wxIEHtmlWin_SetCharset(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxIEHtmlWin * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","charset", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxIEHtmlWin_SetCharset",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_SetCharset. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
_arg1 = wxString_in_helper(_obj1);
if (_arg1 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxIEHtmlWin_SetCharset(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxIEHtmlWin_SetEditMode(_swigobj,_swigarg0) (_swigobj->SetEditMode(_swigarg0))
static PyObject *_wrap_wxIEHtmlWin_SetEditMode(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxIEHtmlWin * _arg0;
bool _arg1;
PyObject * _argo0 = 0;
int tempbool1;
char *_kwnames[] = { "self","seton", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxIEHtmlWin_SetEditMode",_kwnames,&_argo0,&tempbool1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_SetEditMode. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
_arg1 = (bool ) tempbool1;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxIEHtmlWin_SetEditMode(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxIEHtmlWin_GetEditMode(_swigobj) (_swigobj->GetEditMode())
static PyObject *_wrap_wxIEHtmlWin_GetEditMode(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxIEHtmlWin * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIEHtmlWin_GetEditMode",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_GetEditMode. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxIEHtmlWin_GetEditMode(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxIEHtmlWin_GetStringSelection(_swigobj,_swigarg0) (_swigobj->GetStringSelection(_swigarg0))
static PyObject *_wrap_wxIEHtmlWin_GetStringSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxString * _result;
wxIEHtmlWin * _arg0;
bool _arg1 = (bool ) FALSE;
PyObject * _argo0 = 0;
int tempbool1 = (int) FALSE;
char *_kwnames[] = { "self","asHTML", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxIEHtmlWin_GetStringSelection",_kwnames,&_argo0,&tempbool1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_GetStringSelection. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
_arg1 = (bool ) tempbool1;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = new wxString (wxIEHtmlWin_GetStringSelection(_arg0,_arg1));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
}
{
delete _result;
}
return _resultobj;
}
#define wxIEHtmlWin_GetText(_swigobj,_swigarg0) (_swigobj->GetText(_swigarg0))
static PyObject *_wrap_wxIEHtmlWin_GetText(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxString * _result;
wxIEHtmlWin * _arg0;
bool _arg1 = (bool ) FALSE;
PyObject * _argo0 = 0;
int tempbool1 = (int) FALSE;
char *_kwnames[] = { "self","asHTML", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxIEHtmlWin_GetText",_kwnames,&_argo0,&tempbool1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_GetText. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
_arg1 = (bool ) tempbool1;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = new wxString (wxIEHtmlWin_GetText(_arg0,_arg1));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
}
{
delete _result;
}
return _resultobj;
}
#define wxIEHtmlWin_GoBack(_swigobj) (_swigobj->GoBack())
static PyObject *_wrap_wxIEHtmlWin_GoBack(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxIEHtmlWin * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIEHtmlWin_GoBack",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_GoBack. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxIEHtmlWin_GoBack(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxIEHtmlWin_GoForward(_swigobj) (_swigobj->GoForward())
static PyObject *_wrap_wxIEHtmlWin_GoForward(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxIEHtmlWin * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIEHtmlWin_GoForward",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_GoForward. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxIEHtmlWin_GoForward(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxIEHtmlWin_GoHome(_swigobj) (_swigobj->GoHome())
static PyObject *_wrap_wxIEHtmlWin_GoHome(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxIEHtmlWin * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIEHtmlWin_GoHome",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_GoHome. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxIEHtmlWin_GoHome(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxIEHtmlWin_GoSearch(_swigobj) (_swigobj->GoSearch())
static PyObject *_wrap_wxIEHtmlWin_GoSearch(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxIEHtmlWin * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIEHtmlWin_GoSearch",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_GoSearch. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxIEHtmlWin_GoSearch(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxIEHtmlWin_RefreshPage(_swigobj,_swigarg0) (_swigobj->Refresh(_swigarg0))
static PyObject *_wrap_wxIEHtmlWin_RefreshPage(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxIEHtmlWin * _arg0;
wxIEHtmlRefreshLevel _arg1;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","level", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxIEHtmlWin_RefreshPage",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_RefreshPage. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxIEHtmlWin_RefreshPage(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxIEHtmlWin_Stop(_swigobj) (_swigobj->Stop())
static PyObject *_wrap_wxIEHtmlWin_Stop(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxIEHtmlWin * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIEHtmlWin_Stop",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_Stop. Expected _wxIEHtmlWin_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxIEHtmlWin_Stop(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static PyMethodDef iewincMethods[] = {
{ "wxIEHtmlWin_Stop", (PyCFunction) _wrap_wxIEHtmlWin_Stop, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_RefreshPage", (PyCFunction) _wrap_wxIEHtmlWin_RefreshPage, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_GoSearch", (PyCFunction) _wrap_wxIEHtmlWin_GoSearch, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_GoHome", (PyCFunction) _wrap_wxIEHtmlWin_GoHome, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_GoForward", (PyCFunction) _wrap_wxIEHtmlWin_GoForward, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_GoBack", (PyCFunction) _wrap_wxIEHtmlWin_GoBack, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_GetText", (PyCFunction) _wrap_wxIEHtmlWin_GetText, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_GetStringSelection", (PyCFunction) _wrap_wxIEHtmlWin_GetStringSelection, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_GetEditMode", (PyCFunction) _wrap_wxIEHtmlWin_GetEditMode, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_SetEditMode", (PyCFunction) _wrap_wxIEHtmlWin_SetEditMode, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_SetCharset", (PyCFunction) _wrap_wxIEHtmlWin_SetCharset, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_LoadStream", (PyCFunction) _wrap_wxIEHtmlWin_LoadStream, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_LoadString", (PyCFunction) _wrap_wxIEHtmlWin_LoadString, METH_VARARGS | METH_KEYWORDS },
{ "wxIEHtmlWin_LoadUrl", (PyCFunction) _wrap_wxIEHtmlWin_LoadUrl, METH_VARARGS | METH_KEYWORDS },
{ "new_wxIEHtmlWin", (PyCFunction) _wrap_new_wxIEHtmlWin, METH_VARARGS | METH_KEYWORDS },
{ "wxMSHTMLEvent_GetLong2", (PyCFunction) _wrap_wxMSHTMLEvent_GetLong2, METH_VARARGS | METH_KEYWORDS },
{ "wxMSHTMLEvent_GetLong1", (PyCFunction) _wrap_wxMSHTMLEvent_GetLong1, METH_VARARGS | METH_KEYWORDS },
{ "wxMSHTMLEvent_GetText1", (PyCFunction) _wrap_wxMSHTMLEvent_GetText1, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMSHTMLEvent", (PyCFunction) _wrap_new_wxMSHTMLEvent, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus
}
#endif
/*
* This table is used by the pointer type-checker
*/
static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxEvent","_wxMSHTMLEvent",SwigwxMSHTMLEventTowxEvent},
{ "_signed_long","_long",0},
{ "_wxPrintQuality","_wxCoord",0},
{ "_wxPrintQuality","_int",0},
{ "_wxPrintQuality","_signed_int",0},
{ "_wxPrintQuality","_unsigned_int",0},
{ "_wxPrintQuality","_wxWindowID",0},
{ "_wxPrintQuality","_uint",0},
{ "_wxPrintQuality","_EBool",0},
{ "_wxPrintQuality","_size_t",0},
{ "_wxPrintQuality","_time_t",0},
{ "_wxNotifyEvent","_wxMSHTMLEvent",SwigwxMSHTMLEventTowxNotifyEvent},
{ "_byte","_unsigned_char",0},
{ "_long","_unsigned_long",0},
{ "_long","_signed_long",0},
{ "_size_t","_wxCoord",0},
{ "_size_t","_wxPrintQuality",0},
{ "_size_t","_time_t",0},
{ "_size_t","_unsigned_int",0},
{ "_size_t","_int",0},
{ "_size_t","_wxWindowID",0},
{ "_size_t","_uint",0},
{ "_uint","_wxCoord",0},
{ "_uint","_wxPrintQuality",0},
{ "_uint","_time_t",0},
{ "_uint","_size_t",0},
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_wxCommandEvent","_wxMSHTMLEvent",SwigwxMSHTMLEventTowxCommandEvent},
{ "_char","_wxChar",0},
{ "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
{ "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
{ "_signed_int","_wxWindowID",0},
{ "_signed_int","_int",0},
{ "_WXTYPE","_wxDateTime_t",0},
{ "_WXTYPE","_short",0},
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_unsigned_short","_wxDateTime_t",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
{ "_wxObject","_wxIEHtmlWin",SwigwxIEHtmlWinTowxObject},
{ "_wxObject","_wxMSHTMLEvent",SwigwxMSHTMLEventTowxObject},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_unsigned_char","_byte",0},
{ "_unsigned_int","_wxCoord",0},
{ "_unsigned_int","_wxPrintQuality",0},
{ "_unsigned_int","_time_t",0},
{ "_unsigned_int","_size_t",0},
{ "_unsigned_int","_uint",0},
{ "_unsigned_int","_wxWindowID",0},
{ "_unsigned_int","_int",0},
{ "_short","_wxDateTime_t",0},
{ "_short","_WXTYPE",0},
{ "_short","_unsigned_short",0},
{ "_short","_signed_short",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},
{ "_wxWindowID","_time_t",0},
{ "_wxWindowID","_size_t",0},
{ "_wxWindowID","_EBool",0},
{ "_wxWindowID","_uint",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
{ "_int","_wxCoord",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_time_t",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_int","_uint",0},
{ "_int","_wxWindowID",0},
{ "_int","_unsigned_int",0},
{ "_int","_signed_int",0},
{ "_wxDateTime_t","_unsigned_short",0},
{ "_wxDateTime_t","_short",0},
{ "_wxDateTime_t","_WXTYPE",0},
{ "_time_t","_wxCoord",0},
{ "_time_t","_wxPrintQuality",0},
{ "_time_t","_unsigned_int",0},
{ "_time_t","_int",0},
{ "_time_t","_wxWindowID",0},
{ "_time_t","_uint",0},
{ "_time_t","_size_t",0},
{ "_wxCoord","_int",0},
{ "_wxCoord","_signed_int",0},
{ "_wxCoord","_unsigned_int",0},
{ "_wxCoord","_wxWindowID",0},
{ "_wxCoord","_uint",0},
{ "_wxCoord","_EBool",0},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
{ "_wxEvtHandler","_wxIEHtmlWin",SwigwxIEHtmlWinTowxEvtHandler},
{ "_wxWindow","_wxIEHtmlWin",SwigwxIEHtmlWinTowxWindow},
{0,0,0}};
static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT(void) initiewinc() {
PyObject *m, *d;
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("iewinc", iewincMethods);
d = PyModule_GetDict(m);
PyDict_SetItemString(d,"wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2", PyInt_FromLong((long) wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2));
PyDict_SetItemString(d,"wxEVT_COMMAND_MSHTML_NEWWINDOW2", PyInt_FromLong((long) wxEVT_COMMAND_MSHTML_NEWWINDOW2));
PyDict_SetItemString(d,"wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE", PyInt_FromLong((long) wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE));
PyDict_SetItemString(d,"wxEVT_COMMAND_MSHTML_PROGRESSCHANGE", PyInt_FromLong((long) wxEVT_COMMAND_MSHTML_PROGRESSCHANGE));
PyDict_SetItemString(d,"wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE", PyInt_FromLong((long) wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE));
PyDict_SetItemString(d,"wxEVT_COMMAND_MSHTML_TITLECHANGE", PyInt_FromLong((long) wxEVT_COMMAND_MSHTML_TITLECHANGE));
PyDict_SetItemString(d,"wxIEHTML_REFRESH_NORMAL", PyInt_FromLong((long) wxIEHTML_REFRESH_NORMAL));
PyDict_SetItemString(d,"wxIEHTML_REFRESH_IFEXPIRED", PyInt_FromLong((long) wxIEHTML_REFRESH_IFEXPIRED));
PyDict_SetItemString(d,"wxIEHTML_REFRESH_CONTINUE", PyInt_FromLong((long) wxIEHTML_REFRESH_CONTINUE));
PyDict_SetItemString(d,"wxIEHTML_REFRESH_COMPLETELY", PyInt_FromLong((long) wxIEHTML_REFRESH_COMPLETELY));
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)
SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
}
}

View File

@@ -1,139 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: iewin.i
// Purpose: Internet Explorer in a wxWindow
//
// Author: Robin Dunn
//
// Created: 20-Apr-2001
// RCS-ID: $Id$
// Copyright: (c) 2001 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module iewin
%{
#include "wxPython.h"
#include "IEHtmlWin.h"
#include "pyistream.h"
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%extern windows.i
%extern _defs.i
%extern misc.i
%extern events.i
%extern streams.i
%pragma(python) code = "import wx"
//---------------------------------------------------------------------------
%{
// Put some wx default wxChar* values into wxStrings.
DECLARE_DEF_STRING(PanelNameStr);
%}
//---------------------------------------------------------------------------
class wxMSHTMLEvent : public wxNotifyEvent
{
public:
wxMSHTMLEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
wxString GetText1();
long GetLong1();
long GetLong2();
};
enum {
wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2,
wxEVT_COMMAND_MSHTML_NEWWINDOW2,
wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE,
wxEVT_COMMAND_MSHTML_PROGRESSCHANGE,
wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE,
wxEVT_COMMAND_MSHTML_TITLECHANGE,
};
%pragma(python) code = "
def EVT_MSHTML_BEFORENAVIGATE2(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, func)
def EVT_MSHTML_NEWWINDOW2(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_NEWWINDOW2, func)
def EVT_MSHTML_DOCUMENTCOMPLETE(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, func)
def EVT_MSHTML_PROGRESSCHANGE(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, func)
def EVT_MSHTML_STATUSTEXTCHANGE(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, func)
def EVT_MSHTML_TITLECHANGE(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_TITLECHANGE, func)
"
//---------------------------------------------------------------------------
enum wxIEHtmlRefreshLevel {
wxIEHTML_REFRESH_NORMAL = 0,
wxIEHTML_REFRESH_IFEXPIRED = 1,
wxIEHTML_REFRESH_CONTINUE = 2,
wxIEHTML_REFRESH_COMPLETELY = 3
};
class wxIEHtmlWin : public wxWindow /* wxActiveX */
{
public:
wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyPanelNameStr);
void LoadUrl(const wxString&);
bool LoadString(wxString html);
bool LoadStream(wxInputStream *is);
%pragma(python) addtoclass = "Navigate = LoadUrl"
void SetCharset(wxString charset);
void SetEditMode(bool seton);
bool GetEditMode();
wxString GetStringSelection(bool asHTML = FALSE);
wxString GetText(bool asHTML = FALSE);
bool GoBack();
bool GoForward();
bool GoHome();
bool GoSearch();
%name(RefreshPage)bool Refresh(wxIEHtmlRefreshLevel level);
bool Stop();
};
//---------------------------------------------------------------------------
%init %{
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
%}
//----------------------------------------------------------------------
%pragma(python) include="_iewinextras.py";
//---------------------------------------------------------------------------

View File

@@ -1,170 +0,0 @@
# This file was created automatically by SWIG.
import iewinc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
import wx
def EVT_MSHTML_BEFORENAVIGATE2(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, func)
def EVT_MSHTML_NEWWINDOW2(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_NEWWINDOW2, func)
def EVT_MSHTML_DOCUMENTCOMPLETE(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, func)
def EVT_MSHTML_PROGRESSCHANGE(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, func)
def EVT_MSHTML_STATUSTEXTCHANGE(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, func)
def EVT_MSHTML_TITLECHANGE(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MSHTML_TITLECHANGE, func)
class wxMSHTMLEventPtr(wxNotifyEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def GetText1(self, *_args, **_kwargs):
val = apply(iewinc.wxMSHTMLEvent_GetText1,(self,) + _args, _kwargs)
return val
def GetLong1(self, *_args, **_kwargs):
val = apply(iewinc.wxMSHTMLEvent_GetLong1,(self,) + _args, _kwargs)
return val
def GetLong2(self, *_args, **_kwargs):
val = apply(iewinc.wxMSHTMLEvent_GetLong2,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxMSHTMLEvent instance at %s>" % (self.this,)
class wxMSHTMLEvent(wxMSHTMLEventPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(iewinc.new_wxMSHTMLEvent,_args,_kwargs)
self.thisown = 1
class wxIEHtmlWinPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def LoadUrl(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_LoadUrl,(self,) + _args, _kwargs)
return val
def LoadString(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_LoadString,(self,) + _args, _kwargs)
return val
def LoadStream(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_LoadStream,(self,) + _args, _kwargs)
return val
def SetCharset(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_SetCharset,(self,) + _args, _kwargs)
return val
def SetEditMode(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_SetEditMode,(self,) + _args, _kwargs)
return val
def GetEditMode(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_GetEditMode,(self,) + _args, _kwargs)
return val
def GetStringSelection(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_GetStringSelection,(self,) + _args, _kwargs)
return val
def GetText(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_GetText,(self,) + _args, _kwargs)
return val
def GoBack(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_GoBack,(self,) + _args, _kwargs)
return val
def GoForward(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_GoForward,(self,) + _args, _kwargs)
return val
def GoHome(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_GoHome,(self,) + _args, _kwargs)
return val
def GoSearch(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_GoSearch,(self,) + _args, _kwargs)
return val
def RefreshPage(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_RefreshPage,(self,) + _args, _kwargs)
return val
def Stop(self, *_args, **_kwargs):
val = apply(iewinc.wxIEHtmlWin_Stop,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxIEHtmlWin instance at %s>" % (self.this,)
Navigate = LoadUrl
class wxIEHtmlWin(wxIEHtmlWinPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(iewinc.new_wxIEHtmlWin,_args,_kwargs)
self.thisown = 1
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------
wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2 = iewinc.wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2
wxEVT_COMMAND_MSHTML_NEWWINDOW2 = iewinc.wxEVT_COMMAND_MSHTML_NEWWINDOW2
wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE = iewinc.wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE
wxEVT_COMMAND_MSHTML_PROGRESSCHANGE = iewinc.wxEVT_COMMAND_MSHTML_PROGRESSCHANGE
wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE = iewinc.wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE
wxEVT_COMMAND_MSHTML_TITLECHANGE = iewinc.wxEVT_COMMAND_MSHTML_TITLECHANGE
wxIEHTML_REFRESH_NORMAL = iewinc.wxIEHTML_REFRESH_NORMAL
wxIEHTML_REFRESH_IFEXPIRED = iewinc.wxIEHTML_REFRESH_IFEXPIRED
wxIEHTML_REFRESH_CONTINUE = iewinc.wxIEHTML_REFRESH_CONTINUE
wxIEHTML_REFRESH_COMPLETELY = iewinc.wxIEHTML_REFRESH_COMPLETELY
#-------------- USER INCLUDE -----------------------
# Stuff these names into the wx namespace so wxPyConstructObject can find them
wx.wxMSHTMLEventPtr = wxMSHTMLEventPtr
wx.wxIEHtmlWinPtr = wxIEHtmlWinPtr

View File

@@ -1,158 +0,0 @@
Lindsay Mathieson
Email : <lmathieson@optusnet.com.au>
This is prelimanary stuff - the controls need extra methods and events etc,
feel free to email with suggestions &/or patches.
Tested with wxWindows 2.3.2.
Built with MS Visual C++ 6.0 & DevStudio
Minor use of templates and STL
-----------------------------------------------------------
This sample illustrates using wxActiveX and wxIEHtmlWin too:
1. Host an arbitrary ActiveX control
2. Specifically host the MSHTML Control
wxActiveX:
==========
wxActiveX is used to host and siplay any activeX control, all the wxWindows developer
needs to know is either the ProgID or CLSID of the control in question.
Derived From:
- wxWindow
Include Files:
- wxactivex.h
Source Files:
- wxactivex.cpp
Event Handling:
---------------
- EVT_ACTIVEX(id, eventName, handler) (handler = void OnActiveX(wxActiveXEvent& event))
class wxActiveXEvent : public wxNotifyEvent
int ParamCount() const;
wxVariant operator[] (int idx) const; // parameter by index
wxVariant& operator[] (int idx);
wxVariant operator[] (wxString name) const; // named parameters
wxVariant& operator[] (wxString name);
Members:
--------
wxActiveX::wxActiveX(wxWindow * parent, REFCLSID clsid, wxWindowID id = -1);
- Creates a activeX control identified by clsid
e.g
wxFrame *frame = new wxFrame(this, -1, "test");
wxActiveX *X = new wxActiveX(frame, CLSID_WebBrowser);
wxActiveX::wxActiveX(wxWindow * parent, wxString progId, wxWindowID id = -1);
- Creates a activeX control identified by progId
e.g.
wxFrame *frame = new wxFrame(this, -1, "test");
wxActiveX *X = new wxActiveX(frame, "MSCAL.Calendar");
wxActiveX::~wxActiveX();
- Destroys the control
- disconnects all connection points
HRESULT wxActiveX::ConnectAdvise(REFIID riid, IUnknown *eventSink);
- Connects a event sink. Connections are automaticlly diconnected in the destructor
e.g.
FS_DWebBrowserEvents2 *events = new FS_DWebBrowserEvents2(iecontrol);
hret = iecontrol->ConnectAdvise(DIID_DWebBrowserEvents2, events);
if (! SUCCEEDED(hret))
delete events;
Sample Events:
--------------
EVT_ACTIVEX(ID_MSHTML, "BeforeNavigate2", OnMSHTMLBeforeNavigate2X)
void wxIEFrame::OnMSHTMLBeforeNavigate2X(wxActiveXEvent& event)
{
wxString url = event["Url"];
int rc = wxMessageBox(url, "Allow open url ?", wxYES_NO);
if (rc != wxYES)
event["Cancel"] = true;
};
wxIEHtmlWin:
============
wxIEHtmlWin is a specialisation of the wxActiveX control for hosting the MSHTML control.
Derived From:
- wxActiveX
- wxWindow
Event Handling:
---------------
- class wxMSHTMLEvent
- EVT_MSHTML_BEFORENAVIGATE2
* url = event.m_text1
* event.Veto() to cancel
Generated before an attempt to browse a new url
- EVT_MSHTML_NEWWINDOW2
* event.Veto() to cancel
Generated when the control is asked create a new window (e.g a popup)
- EVT_MSHTML_DOCUMENTCOMPLETE
* url = event.m_text1
Generated after the document has finished loading
- EVT_MSHTML_PROGRESSCHANGE
* event.m_long1 = progress so far
* event.m_long2 = max range of progress
- EVT_MSHTML_STATUSTEXTCHANGE
* status = event.m_text1
- EVT_MSHTML_TITLECHANGE
* title = event.m_text1
Members:
--------
wxIEHtmlWin::wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1);
- Constructs and initialises the MSHTML control
- LoadUrl("about:blank") is called
wxIEHtmlWin::~wxIEHtmlWin();
- destroys the control
void wxIEHtmlWin::LoadUrl(const wxString&);
- Attempts to browse to the url, the control uses its internal (MS)
network streams
bool wxIEHtmlWin::LoadString(wxString html);
- Load the passed HTML string
bool wxIEHtmlWin::LoadStream(istream *strm);
- load the passed HTML stream. The control takes ownership of
the pointer, deleting when finished.
void wxIEHtmlWin::SetCharset(wxString charset);
- Sets the charset of the loaded document
void wxIEHtmlWin::SetEditMode(bool seton);
- Sets edit mode.
NOTE: This does work, but is bare bones - we need more events exposed before
this is usable as an HTML editor.
bool wxIEHtmlWin::GetEditMode();
- Returns the edit mode setting
wxString wxIEHtmlWin::GetStringSelection(bool asHTML = false);
- Returns the currently selected text (plain or HTML text)
wxString GetText(bool asHTML = false);
- Returns the body text (plain or HTML text)
Lindsay Mathieson
Email : <lmathieson@optusnet.com.au>

File diff suppressed because it is too large Load Diff

View File

@@ -1,392 +0,0 @@
#ifndef WX_ACTIVE_X
#define WX_ACTIVE_X
#pragma warning( disable : 4101 4786)
#pragma warning( disable : 4786)
#include <wx/setup.h>
#include <wx/wx.h>
#include <wx/variant.h>
#include <oleidl.h>
#include <exdisp.h>
#include <docobj.h>
#include <iostream>
#include <vector>
#include <map>
using namespace std;
//////////////////////////////////////////
// wxAutoOleInterface<Interface>
// Template class for smart interface handling
// - Automatically dereferences ole interfaces
// - Smart Copy Semantics
// - Can Create Interfaces
// - Can query for other interfaces
template <class I> class wxAutoOleInterface
{
protected:
I *m_interface;
public:
// takes ownership of an existing interface
// Assumed to already have a AddRef() applied
explicit wxAutoOleInterface(I *pInterface = NULL) : m_interface(pInterface) {}
// queries for an interface
wxAutoOleInterface(REFIID riid, IUnknown *pUnk) : m_interface(NULL)
{
QueryInterface(riid, pUnk);
};
// queries for an interface
wxAutoOleInterface(REFIID riid, IDispatch *pDispatch) : m_interface(NULL)
{
QueryInterface(riid, pDispatch);
};
// Creates an Interface
wxAutoOleInterface(REFCLSID clsid, REFIID riid) : m_interface(NULL)
{
CreateInstance(clsid, riid);
};
// copy constructor
wxAutoOleInterface(const wxAutoOleInterface<I>& ti) : m_interface(NULL)
{
operator = (ti);
}
// assignment operator
wxAutoOleInterface<I>& operator = (const wxAutoOleInterface<I>& ti)
{
if (ti.m_interface)
ti.m_interface->AddRef();
Free();
m_interface = ti.m_interface;
return *this;
}
// takes ownership of an existing interface
// Assumed to already have a AddRef() applied
wxAutoOleInterface<I>& operator = (I *&ti)
{
Free();
m_interface = ti;
return *this;
}
~wxAutoOleInterface()
{
Free();
};
inline void Free()
{
if (m_interface)
m_interface->Release();
m_interface = NULL;
};
// queries for an interface
HRESULT QueryInterface(REFIID riid, IUnknown *pUnk)
{
Free();
wxASSERT(pUnk != NULL);
return pUnk->QueryInterface(riid, (void **) &m_interface);
};
// Create a Interface instance
HRESULT CreateInstance(REFCLSID clsid, REFIID riid)
{
Free();
return CoCreateInstance(clsid, NULL, CLSCTX_ALL, riid, (void **) &m_interface);
};
inline operator I *() const {return m_interface;}
inline I* operator ->() {return m_interface;}
inline I** GetRef() {return &m_interface;}
inline bool Ok() const {return m_interface != NULL;}
};
wxString OLEHResultToString(HRESULT hr);
wxString GetIIDName(REFIID riid);
//#define __WXOLEDEBUG
#ifdef __WXOLEDEBUG
#define WXOLE_TRACE(str) {OutputDebugString(str);OutputDebugString("\r\n");}
#define WXOLE_TRACEOUT(stuff)\
{\
ostringstream os;\
os << stuff << ends;\
WXOLE_TRACE(os.str().c_str());\
}
#define WXOLE_WARN(__hr,msg)\
{\
if (__hr != S_OK)\
{\
wxString s = "*** ";\
s += msg;\
s += " : "+ OLEHResultToString(__hr);\
WXOLE_TRACE(s.c_str());\
}\
}
#else
#define WXOLE_TRACE(str)
#define WXOLE_TRACEOUT(stuff)
#define WXOLE_WARN(_proc,msg) {_proc;}
#endif
// Auto Initialisation
class wxOleInit
{
public:
static IMalloc *GetIMalloc();
wxOleInit();
~wxOleInit();
};
#define DECLARE_OLE_UNKNOWN(cls)\
private:\
class TAutoInitInt\
{\
public:\
LONG l;\
TAutoInitInt() : l(0) {}\
};\
TAutoInitInt refCount, lockCount;\
wxOleInit oleInit;\
static void _GetInterface(cls *self, REFIID iid, void **_interface, const char *&desc);\
public:\
LONG GetRefCount();\
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void ** ppvObject);\
ULONG STDMETHODCALLTYPE AddRef();\
ULONG STDMETHODCALLTYPE Release();\
ULONG STDMETHODCALLTYPE AddLock();\
ULONG STDMETHODCALLTYPE ReleaseLock()
#define DEFINE_OLE_TABLE(cls)\
LONG cls::GetRefCount() {return refCount.l;}\
HRESULT STDMETHODCALLTYPE cls::QueryInterface(REFIID iid, void ** ppvObject)\
{\
if (! ppvObject)\
{\
WXOLE_TRACE("*** NULL POINTER ***");\
return E_FAIL;\
};\
const char *desc = NULL;\
cls::_GetInterface(this, iid, ppvObject, desc);\
if (! *ppvObject)\
{\
WXOLE_TRACEOUT("<" << GetIIDName(iid).c_str() << "> Not Found");\
return E_NOINTERFACE;\
};\
WXOLE_TRACEOUT("QI : <" << desc <<">");\
((IUnknown * )(*ppvObject))->AddRef();\
return S_OK;\
};\
ULONG STDMETHODCALLTYPE cls::AddRef()\
{\
WXOLE_TRACEOUT(# cls << "::Add ref(" << refCount.l << ")");\
InterlockedIncrement(&refCount.l);\
return refCount.l;\
};\
ULONG STDMETHODCALLTYPE cls::Release()\
{\
if (refCount.l > 0)\
{\
InterlockedDecrement(&refCount.l);\
WXOLE_TRACEOUT(# cls << "::Del ref(" << refCount.l << ")");\
if (refCount.l == 0)\
{\
delete this;\
return 0;\
};\
return refCount.l;\
}\
else\
return 0;\
}\
ULONG STDMETHODCALLTYPE cls::AddLock()\
{\
WXOLE_TRACEOUT(# cls << "::Add Lock(" << lockCount.l << ")");\
InterlockedIncrement(&lockCount.l);\
return lockCount.l;\
};\
ULONG STDMETHODCALLTYPE cls::ReleaseLock()\
{\
if (lockCount.l > 0)\
{\
InterlockedDecrement(&lockCount.l);\
WXOLE_TRACEOUT(# cls << "::Del Lock(" << lockCount.l << ")");\
return lockCount.l;\
}\
else\
return 0;\
}\
DEFINE_OLE_BASE(cls)
#define DEFINE_OLE_BASE(cls)\
void cls::_GetInterface(cls *self, REFIID iid, void **_interface, const char *&desc)\
{\
*_interface = NULL;\
desc = NULL;
#define OLE_INTERFACE(_iid, _type)\
if (IsEqualIID(iid, _iid))\
{\
WXOLE_TRACE("Found Interface <" # _type ">");\
*_interface = (IUnknown *) (_type *) self;\
desc = # _iid;\
return;\
}
#define OLE_IINTERFACE(_face) OLE_INTERFACE(IID_##_face, _face)
#define OLE_INTERFACE_CUSTOM(func)\
if (func(self, iid, _interface, desc))\
return
#define END_OLE_TABLE\
}
class wxActiveX : public wxWindow {
public:
////////////////////////////////////////
// type stuff
class ParamX // refer to ELEMDESC, IDLDESC in MSDN
{
public:
USHORT flags;
bool isPtr, isSafeArray;
VARTYPE vt;
wxString name;
inline bool IsIn() const {return (flags & IDLFLAG_FIN) != 0;}
inline bool IsOut() const {return (flags & IDLFLAG_FOUT) != 0;}
inline bool IsRetVal() const {return (flags & IDLFLAG_FRETVAL) != 0;}
};
typedef vector<ParamX> ParamXArray;
class FuncX // refer to FUNCDESC in MSDN
{
public:
wxString name;
MEMBERID memid;
bool hasOut;
ParamXArray params;
};
typedef vector<FuncX> FuncXArray;
typedef map<MEMBERID, int> MemberIdList;
wxActiveX(wxWindow * parent, REFCLSID clsid, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
wxActiveX(wxWindow * parent, wxString progId, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxActiveX();
void CreateActiveX(REFCLSID clsid);
void CreateActiveX(LPOLESTR progId);
// expose type info
inline int GetEventCount() const {return m_events.size();}
const FuncX& GetEvent(int idx) const;
HRESULT ConnectAdvise(REFIID riid, IUnknown *eventSink);
void OnSize(wxSizeEvent&);
void OnPaint(wxPaintEvent& event);
void OnMouse(wxMouseEvent& event);
void OnSetFocus(wxFocusEvent&);
void OnKillFocus(wxFocusEvent&);
DECLARE_EVENT_TABLE();
protected:
friend class FrameSite;
friend class wxActiveXEvents;
typedef wxAutoOleInterface<IConnectionPoint> wxOleConnectionPoint;
typedef pair<wxOleConnectionPoint, DWORD> wxOleConnection;
typedef vector<wxOleConnection> wxOleConnectionArray;
wxAutoOleInterface<IOleClientSite> m_clientSite;
wxAutoOleInterface<IUnknown> m_ActiveX;
wxAutoOleInterface<IOleObject> m_oleObject;
wxAutoOleInterface<IOleInPlaceObject> m_oleInPlaceObject;
wxAutoOleInterface<IOleInPlaceActiveObject>
m_oleInPlaceActiveObject;
wxAutoOleInterface<IOleDocumentView> m_docView;
wxAutoOleInterface<IViewObject> m_viewObject;
HWND m_oleObjectHWND;
bool m_bAmbientUserMode;
DWORD m_docAdviseCookie;
wxOleConnectionArray m_connections;
HRESULT AmbientPropertyChanged(DISPID dispid);
void GetTypeInfo();
void GetTypeInfo(ITypeInfo *ti, bool defEventSink);
// events
FuncXArray m_events;
MemberIdList m_eventsIdx;
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
};
// events
class wxActiveXEvent : public wxCommandEvent
{
private:
friend class wxActiveXEvents;
wxVariant m_params;
public:
virtual wxEvent *Clone() const { return new wxActiveXEvent(*this); }
wxString EventName();
int ParamCount() const;
wxString ParamType(int idx);
wxString ParamName(int idx);
wxVariant operator[] (int idx) const;
wxVariant& operator[] (int idx);
wxVariant operator[] (wxString name) const;
wxVariant& operator[] (wxString name);
};
const wxEventType& RegisterActiveXEvent(const wxChar *eventName);
const wxEventType& RegisterActiveXEvent(DISPID event);
typedef void (wxEvtHandler::*wxActiveXEventFunction)(wxActiveXEvent&);
#define EVT_ACTIVEX(id, eventName, fn) DECLARE_EVENT_TABLE_ENTRY(RegisterActiveXEvent(wxT(eventName)), id, -1, (wxObjectEventFunction) (wxEventFunction) (wxActiveXEventFunction) & fn, (wxObject *) NULL ),
#define EVT_ACTIVEX_DISPID(id, eventDispId, fn) DECLARE_EVENT_TABLE_ENTRY(RegisterActiveXEvent(eventDispId), id, -1, (wxObjectEventFunction) (wxEventFunction) (wxActiveXEventFunction) & fn, (wxObject *) NULL ),
//util
bool MSWVariantToVariant(VARIANTARG& va, wxVariant& vx);
bool VariantToMSWVariant(wxVariant& vx, VARIANTARG& va);
#endif /* _IEHTMLWIN_H_ */

View File

@@ -1,6 +0,0 @@
Makefile
contrib
oglc.exp
oglc.ilk
oglc.pch
oglc.pyd

View File

@@ -1,7 +0,0 @@
Since OGL is not always bundled with distributions of wxWindows, in
order for it to be a standard part of wxPython I need to bundle it
here. The contents of the contrib directory are copies of the
relevant parts of the main contrib directory in wxWindows. The
build.py script in this directory will also build the needed files
from there, so you no longer have to worry about aquiring and building
additional libraries beyond wxWindows itself.

View File

@@ -1,138 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: _ogldefs.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 27-Aug-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
//---------------------------------------------------------------------------
class wxOGLConstraint;
class wxBitmapShape;
class wxDiagram;
class wxDrawnShape;
class wxCircleShape;
class wxCompositeShape;
class wxDividedShape;
class wxDivisionShape;
class wxEllipseShape;
class wxLineShape;
class wxPolygonShape;
class wxRectangleShape;
class wxPseudoMetaFile;
class wxShape;
class wxShapeCanvas;
class wxShapeEvtHandler;
class wxTextShape;
class wxControlPoint;
class wxPyOGLConstraint;
class wxPyBitmapShape;
class wxPyDiagram;
class wxPyDrawnShape;
class wxPyCircleShape;
class wxPyCompositeShape;
class wxPyDividedShape;
class wxPyDivisionShape;
class wxPyEllipseShape;
class wxPyLineShape;
class wxPyPolygonShape;
class wxPyRectangleShape;
class wxPyPseudoMetaFile;
class wxPyShape;
class wxPyShapeCanvas;
class wxPyShapeEvtHandler;
class wxPyTextShape;
class wxPyControlPoint;
//---------------------------------------------------------------------------
// Typemaps just for OGL
// OOR Support
%typemap(python, out) wxPyShape* { $target = wxPyMake_wxShapeEvtHandler($source); }
%typemap(python, out) wxPyShapeEvtHandler* { $target = wxPyMake_wxShapeEvtHandler($source); }
%typemap(python, out) wxPyDivisionShape* { $target = wxPyMake_wxShapeEvtHandler($source); }
%typemap(python, out) wxPyShapeCanvas* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxDiagram* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxOGLConstraint* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxPseudoMetaFile* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxArrowHead* { $target = wxPyMake_wxObject($source); }
// 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;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------

View File

@@ -1,41 +0,0 @@
# aliases
wxShapeCanvas = wxPyShapeCanvas
wxShapeEvtHandler = wxPyShapeEvtHandler
wxShape = wxPyShape
wxRectangleShape = wxPyRectangleShape
wxBitmapShape = wxPyBitmapShape
wxDrawnShape = wxPyDrawnShape
wxCompositeShape = wxPyCompositeShape
wxDividedShape = wxPyDividedShape
wxDivisionShape = wxPyDivisionShape
wxEllipseShape = wxPyEllipseShape
wxCircleShape = wxPyCircleShape
wxLineShape = wxPyLineShape
wxPolygonShape = wxPyPolygonShape
wxTextShape = wxPyTextShape
wxControlPoint = wxPyControlPoint
# Stuff these names into the wx namespace so wxPyConstructObject can find them
import wx
wx.wxArrowHeadPtr = wxArrowHeadPtr
wx.wxControlPointPtr = wxPyControlPointPtr
wx.wxDiagramPtr = wxDiagramPtr
wx.wxOGLConstraintPtr = wxOGLConstraintPtr
wx.wxPseudoMetaFilePtr = wxPseudoMetaFile
wx.wxPyBitmapShapePtr = wxPyBitmapShapePtr
wx.wxPyCircleShapePtr = wxPyCircleShapePtr
wx.wxPyCompositeShapePtr = wxPyCompositeShapePtr
wx.wxPyControlPointPtr = wxPyControlPointPtr
wx.wxPyDividedShapePtr = wxPyDividedShapePtr
wx.wxPyDivisionShapePtr = wxPyDivisionShapePtr
wx.wxPyDrawnShapePtr = wxPyDrawnShapePtr
wx.wxPyEllipseShapePtr = wxPyEllipseShapePtr
wx.wxPyLineShapePtr = wxPyLineShapePtr
wx.wxPyPolygonShapePtr = wxPyPolygonShapePtr
wx.wxPyRectangleShapePtr = wxPyRectangleShapePtr
wx.wxPyShapeCanvasPtr = wxPyShapeCanvasPtr
wx.wxPyShapeEvtHandlerPtr = wxPyShapeEvtHandlerPtr
wx.wxPyShapePtr = wxPyShapePtr
wx.wxPyTextShapePtr = wxPyTextShapePtr
wx.wxShapeRegionPtr = wxShapeRegionPtr

View File

@@ -1,488 +0,0 @@
/*
* FILE : contrib/ogl/ogl.cpp
*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
* Version 1.1 (Build 883)
*
* Portions Copyright (c) 1995-1998
* The University of Utah and The Regents of the University of California.
* Permission is granted to distribute this file in any manner provided
* this notice remains intact.
*
* Do not make changes to this file--changes will be lost!
*
*/
#define SWIGCODE
/* Implementation : PYTHON */
#define SWIGPYTHON
#include "Python.h"
#include <string.h>
#include <stdlib.h>
/* 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
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
extern PyObject *SWIG_newvarlink(void);
#ifdef __cplusplus
}
#endif
#define SWIG_init initoglc
#define SWIG_name "oglc"
#include "wxPython.h"
#include "oglhelpers.h"
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
target = o;
} else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
} 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);
o2 = target;
target = PySequence_Concat(o2, o3);
Py_DECREF(o2);
Py_DECREF(o3);
}
return target;
}
//---------------------------------------------------------------------------
// 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) {
wxPyBeginBlockThreads();
if (!PyList_Check(pyList)) {
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
wxPyEndBlockThreads();
return NULL;
}
int count = PyList_Size(pyList);
wxList* list = new wxList;
if (! list) {
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
wxPyEndBlockThreads();
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);
wxPyEndBlockThreads();
return NULL;
}
list->Append(wxo);
}
wxPyEndBlockThreads();
return list;
}
//---------------------------------------------------------------------------
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
wxPyBeginBlockThreads();
if (!PyList_Check(pyList)) {
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
wxPyEndBlockThreads();
return NULL;
}
int count = PyList_Size(pyList);
wxList* list = new wxList;
if (! list) {
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
wxPyEndBlockThreads();
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");
wxPyEndBlockThreads();
return NULL;
}
list->Append((wxObject*) new wxRealPoint(*wxo));
}
}
wxPyEndBlockThreads();
return list;
}
//---------------------------------------------------------------------------
PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
PyObject* target = NULL;
if (source && wxIsKindOf(source, wxShapeEvtHandler)) {
// If it's derived from wxShapeEvtHandler then there may
// already be a pointer to a Python object that we can use
// in the OOR data.
wxShapeEvtHandler* seh = (wxShapeEvtHandler*)source;
wxPyOORClientData* data = (wxPyOORClientData*)seh->GetClientObject();
if (data) {
target = data->m_obj;
Py_INCREF(target);
}
}
if (! target) {
target = wxPyMake_wxObject2(source, FALSE);
if (target != Py_None)
((wxShapeEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target));
}
return target;
}
//---------------------------------------------------------------------------
PyObject* wxPy_ConvertShapeList(wxListBase* list, const char* className) {
PyObject* pyList;
PyObject* pyObj;
wxObject* wxObj;
wxNode* node = list->First();
wxPyBeginBlockThreads();
pyList = PyList_New(0);
while (node) {
wxObj = node->Data();
pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj);
PyList_Append(pyList, pyObj);
node = node->Next();
}
wxPyEndBlockThreads();
return pyList;
}
//---------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxPyShapeCanvas, wxShapeCanvas);
IMPLEMENT_DYNAMIC_CLASS(wxPyShapeEvtHandler, wxShapeEvtHandler);
IMPLEMENT_ABSTRACT_CLASS(wxPyShape, wxShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyRectangleShape, wxRectangleShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyControlPoint, wxControlPoint);
IMPLEMENT_DYNAMIC_CLASS(wxPyBitmapShape, wxBitmapShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyDrawnShape, wxDrawnShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyCompositeShape, wxCompositeShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyDividedShape, wxDividedShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyDivisionShape, wxDivisionShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyEllipseShape, wxEllipseShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyCircleShape, wxCircleShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyLineShape, wxLineShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyPolygonShape, wxPolygonShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyTextShape, wxTextShape);
//---------------------------------------------------------------------------
extern "C" SWIGEXPORT(void) initoglbasicc();
extern "C" SWIGEXPORT(void) initoglshapesc();
extern "C" SWIGEXPORT(void) initoglshapes2c();
extern "C" SWIGEXPORT(void) initoglcanvasc();
#ifdef __cplusplus
extern "C" {
#endif
static PyObject *_wrap_wxOGLInitialize(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLInitialize",_kwnames))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxOGLInitialize();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static PyObject *_wrap_wxOGLCleanUp(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLCleanUp",_kwnames))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
wxOGLCleanUp();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static PyMethodDef oglcMethods[] = {
{ "wxOGLCleanUp", (PyCFunction) _wrap_wxOGLCleanUp, METH_VARARGS | METH_KEYWORDS },
{ "wxOGLInitialize", (PyCFunction) _wrap_wxOGLInitialize, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus
}
#endif
/*
* This table is used by the pointer type-checker
*/
static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_signed_long","_long",0},
{ "_wxPrintQuality","_wxCoord",0},
{ "_wxPrintQuality","_int",0},
{ "_wxPrintQuality","_signed_int",0},
{ "_wxPrintQuality","_unsigned_int",0},
{ "_wxPrintQuality","_wxWindowID",0},
{ "_wxPrintQuality","_uint",0},
{ "_wxPrintQuality","_EBool",0},
{ "_wxPrintQuality","_size_t",0},
{ "_wxPrintQuality","_time_t",0},
{ "_byte","_unsigned_char",0},
{ "_long","_unsigned_long",0},
{ "_long","_signed_long",0},
{ "_size_t","_wxCoord",0},
{ "_size_t","_wxPrintQuality",0},
{ "_size_t","_time_t",0},
{ "_size_t","_unsigned_int",0},
{ "_size_t","_int",0},
{ "_size_t","_wxWindowID",0},
{ "_size_t","_uint",0},
{ "_uint","_wxCoord",0},
{ "_uint","_wxPrintQuality",0},
{ "_uint","_time_t",0},
{ "_uint","_size_t",0},
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_char","_wxChar",0},
{ "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
{ "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
{ "_signed_int","_wxWindowID",0},
{ "_signed_int","_int",0},
{ "_WXTYPE","_wxDateTime_t",0},
{ "_WXTYPE","_short",0},
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_unsigned_short","_wxDateTime_t",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_unsigned_char","_byte",0},
{ "_unsigned_int","_wxCoord",0},
{ "_unsigned_int","_wxPrintQuality",0},
{ "_unsigned_int","_time_t",0},
{ "_unsigned_int","_size_t",0},
{ "_unsigned_int","_uint",0},
{ "_unsigned_int","_wxWindowID",0},
{ "_unsigned_int","_int",0},
{ "_short","_wxDateTime_t",0},
{ "_short","_WXTYPE",0},
{ "_short","_unsigned_short",0},
{ "_short","_signed_short",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},
{ "_wxWindowID","_time_t",0},
{ "_wxWindowID","_size_t",0},
{ "_wxWindowID","_EBool",0},
{ "_wxWindowID","_uint",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
{ "_int","_wxCoord",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_time_t",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_int","_uint",0},
{ "_int","_wxWindowID",0},
{ "_int","_unsigned_int",0},
{ "_int","_signed_int",0},
{ "_wxDateTime_t","_unsigned_short",0},
{ "_wxDateTime_t","_short",0},
{ "_wxDateTime_t","_WXTYPE",0},
{ "_time_t","_wxCoord",0},
{ "_time_t","_wxPrintQuality",0},
{ "_time_t","_unsigned_int",0},
{ "_time_t","_int",0},
{ "_time_t","_wxWindowID",0},
{ "_time_t","_uint",0},
{ "_time_t","_size_t",0},
{ "_wxCoord","_int",0},
{ "_wxCoord","_signed_int",0},
{ "_wxCoord","_unsigned_int",0},
{ "_wxCoord","_wxWindowID",0},
{ "_wxCoord","_uint",0},
{ "_wxCoord","_EBool",0},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
{0,0,0}};
static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT(void) initoglc() {
PyObject *m, *d;
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("oglc", oglcMethods);
d = PyModule_GetDict(m);
PyDict_SetItemString(d,"KEY_SHIFT", PyInt_FromLong((long) KEY_SHIFT));
PyDict_SetItemString(d,"KEY_CTRL", PyInt_FromLong((long) KEY_CTRL));
PyDict_SetItemString(d,"ARROW_NONE", PyInt_FromLong((long) ARROW_NONE));
PyDict_SetItemString(d,"ARROW_END", PyInt_FromLong((long) ARROW_END));
PyDict_SetItemString(d,"ARROW_BOTH", PyInt_FromLong((long) ARROW_BOTH));
PyDict_SetItemString(d,"ARROW_MIDDLE", PyInt_FromLong((long) ARROW_MIDDLE));
PyDict_SetItemString(d,"ARROW_START", PyInt_FromLong((long) ARROW_START));
PyDict_SetItemString(d,"ARROW_HOLLOW_CIRCLE", PyInt_FromLong((long) ARROW_HOLLOW_CIRCLE));
PyDict_SetItemString(d,"ARROW_FILLED_CIRCLE", PyInt_FromLong((long) ARROW_FILLED_CIRCLE));
PyDict_SetItemString(d,"ARROW_ARROW", PyInt_FromLong((long) ARROW_ARROW));
PyDict_SetItemString(d,"ARROW_SINGLE_OBLIQUE", PyInt_FromLong((long) ARROW_SINGLE_OBLIQUE));
PyDict_SetItemString(d,"ARROW_DOUBLE_OBLIQUE", PyInt_FromLong((long) ARROW_DOUBLE_OBLIQUE));
PyDict_SetItemString(d,"ARROW_METAFILE", PyInt_FromLong((long) ARROW_METAFILE));
PyDict_SetItemString(d,"ARROW_POSITION_END", PyInt_FromLong((long) ARROW_POSITION_END));
PyDict_SetItemString(d,"ARROW_POSITION_START", PyInt_FromLong((long) ARROW_POSITION_START));
PyDict_SetItemString(d,"CONTROL_POINT_VERTICAL", PyInt_FromLong((long) CONTROL_POINT_VERTICAL));
PyDict_SetItemString(d,"CONTROL_POINT_HORIZONTAL", PyInt_FromLong((long) CONTROL_POINT_HORIZONTAL));
PyDict_SetItemString(d,"CONTROL_POINT_DIAGONAL", PyInt_FromLong((long) CONTROL_POINT_DIAGONAL));
PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_TO", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_TO));
PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_FROM", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_FROM));
PyDict_SetItemString(d,"CONTROL_POINT_LINE", PyInt_FromLong((long) CONTROL_POINT_LINE));
PyDict_SetItemString(d,"FORMAT_NONE", PyInt_FromLong((long) FORMAT_NONE));
PyDict_SetItemString(d,"FORMAT_CENTRE_HORIZ", PyInt_FromLong((long) FORMAT_CENTRE_HORIZ));
PyDict_SetItemString(d,"FORMAT_CENTRE_VERT", PyInt_FromLong((long) FORMAT_CENTRE_VERT));
PyDict_SetItemString(d,"FORMAT_SIZE_TO_CONTENTS", PyInt_FromLong((long) FORMAT_SIZE_TO_CONTENTS));
PyDict_SetItemString(d,"LINE_ALIGNMENT_HORIZ", PyInt_FromLong((long) LINE_ALIGNMENT_HORIZ));
PyDict_SetItemString(d,"LINE_ALIGNMENT_VERT", PyInt_FromLong((long) LINE_ALIGNMENT_VERT));
PyDict_SetItemString(d,"LINE_ALIGNMENT_TO_NEXT_HANDLE", PyInt_FromLong((long) LINE_ALIGNMENT_TO_NEXT_HANDLE));
PyDict_SetItemString(d,"LINE_ALIGNMENT_NONE", PyInt_FromLong((long) LINE_ALIGNMENT_NONE));
PyDict_SetItemString(d,"SHADOW_NONE", PyInt_FromLong((long) SHADOW_NONE));
PyDict_SetItemString(d,"SHADOW_LEFT", PyInt_FromLong((long) SHADOW_LEFT));
PyDict_SetItemString(d,"SHADOW_RIGHT", PyInt_FromLong((long) SHADOW_RIGHT));
PyDict_SetItemString(d,"OP_CLICK_LEFT", PyInt_FromLong((long) OP_CLICK_LEFT));
PyDict_SetItemString(d,"OP_CLICK_RIGHT", PyInt_FromLong((long) OP_CLICK_RIGHT));
PyDict_SetItemString(d,"OP_DRAG_LEFT", PyInt_FromLong((long) OP_DRAG_LEFT));
PyDict_SetItemString(d,"OP_DRAG_RIGHT", PyInt_FromLong((long) OP_DRAG_RIGHT));
PyDict_SetItemString(d,"OP_ALL", PyInt_FromLong((long) OP_ALL));
PyDict_SetItemString(d,"ATTACHMENT_MODE_NONE", PyInt_FromLong((long) ATTACHMENT_MODE_NONE));
PyDict_SetItemString(d,"ATTACHMENT_MODE_EDGE", PyInt_FromLong((long) ATTACHMENT_MODE_EDGE));
PyDict_SetItemString(d,"ATTACHMENT_MODE_BRANCHING", PyInt_FromLong((long) ATTACHMENT_MODE_BRANCHING));
PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_NORMAL", PyInt_FromLong((long) BRANCHING_ATTACHMENT_NORMAL));
PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_BLOB", PyInt_FromLong((long) BRANCHING_ATTACHMENT_BLOB));
PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_VERTICALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_VERTICALLY));
PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_HORIZONTALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_HORIZONTALLY));
PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_BOTH", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_BOTH));
PyDict_SetItemString(d,"gyCONSTRAINT_LEFT_OF", PyInt_FromLong((long) gyCONSTRAINT_LEFT_OF));
PyDict_SetItemString(d,"gyCONSTRAINT_RIGHT_OF", PyInt_FromLong((long) gyCONSTRAINT_RIGHT_OF));
PyDict_SetItemString(d,"gyCONSTRAINT_ABOVE", PyInt_FromLong((long) gyCONSTRAINT_ABOVE));
PyDict_SetItemString(d,"gyCONSTRAINT_BELOW", PyInt_FromLong((long) gyCONSTRAINT_BELOW));
PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_TOP));
PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_BOTTOM));
PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_LEFT));
PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_RIGHT));
PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_TOP));
PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_BOTTOM));
PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_LEFT));
PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_RIGHT));
PyDict_SetItemString(d,"DIVISION_SIDE_NONE", PyInt_FromLong((long) DIVISION_SIDE_NONE));
PyDict_SetItemString(d,"DIVISION_SIDE_LEFT", PyInt_FromLong((long) DIVISION_SIDE_LEFT));
PyDict_SetItemString(d,"DIVISION_SIDE_TOP", PyInt_FromLong((long) DIVISION_SIDE_TOP));
PyDict_SetItemString(d,"DIVISION_SIDE_RIGHT", PyInt_FromLong((long) DIVISION_SIDE_RIGHT));
PyDict_SetItemString(d,"DIVISION_SIDE_BOTTOM", PyInt_FromLong((long) DIVISION_SIDE_BOTTOM));
initoglbasicc();
initoglshapesc();
initoglshapes2c();
initoglcanvasc();
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
wxPyPtrTypeMap_Add("wxControlPoint", "wxPyControlPoint");
wxPyPtrTypeMap_Add("wxShapeCanvas", "wxPyShapeCanvas");
wxPyPtrTypeMap_Add("wxShapeEvtHandler", "wxPyShapeEvtHandler");
wxPyPtrTypeMap_Add("wxShape", "wxPyShape");
wxPyPtrTypeMap_Add("wxRectangleShape", "wxPyRectangleShape");
wxPyPtrTypeMap_Add("wxDrawnShape", "wxPyDrawnShape");
wxPyPtrTypeMap_Add("wxCompositeShape", "wxPyCompositeShape");
wxPyPtrTypeMap_Add("wxDividedShape", "wxPyDividedShape");
wxPyPtrTypeMap_Add("wxDivisionShape", "wxPyDivisionShape");
wxPyPtrTypeMap_Add("wxEllipseShape", "wxPyEllipseShape");
wxPyPtrTypeMap_Add("wxCircleShape", "wxPyCircleShape");
wxPyPtrTypeMap_Add("wxLineShape", "wxPyLineShape");
wxPyPtrTypeMap_Add("wxPolygonShape", "wxPyPolygonShape");
wxPyPtrTypeMap_Add("wxTextShape", "wxPyTextShape");
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)
SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
}
}

View File

@@ -1,321 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: ogl.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 30-June-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module ogl
%{
#include "wxPython.h"
#include "oglhelpers.h"
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%import windows.i
%extern _defs.i
%extern misc.i
%extern gdi.i
%include _ogldefs.i
%import oglbasic.i
%import oglshapes.i
%import oglshapes2.i
%import oglcanvas.i
%pragma(python) code = "import wx"
//---------------------------------------------------------------------------
enum {
KEY_SHIFT,
KEY_CTRL,
ARROW_NONE,
ARROW_END,
ARROW_BOTH,
ARROW_MIDDLE,
ARROW_START,
ARROW_HOLLOW_CIRCLE,
ARROW_FILLED_CIRCLE,
ARROW_ARROW,
ARROW_SINGLE_OBLIQUE,
ARROW_DOUBLE_OBLIQUE,
ARROW_METAFILE,
ARROW_POSITION_END,
ARROW_POSITION_START,
CONTROL_POINT_VERTICAL,
CONTROL_POINT_HORIZONTAL,
CONTROL_POINT_DIAGONAL,
CONTROL_POINT_ENDPOINT_TO,
CONTROL_POINT_ENDPOINT_FROM,
CONTROL_POINT_LINE,
FORMAT_NONE,
FORMAT_CENTRE_HORIZ,
FORMAT_CENTRE_VERT,
FORMAT_SIZE_TO_CONTENTS,
LINE_ALIGNMENT_HORIZ,
LINE_ALIGNMENT_VERT,
LINE_ALIGNMENT_TO_NEXT_HANDLE,
LINE_ALIGNMENT_NONE,
SHADOW_NONE,
SHADOW_LEFT,
SHADOW_RIGHT,
// SHAPE_BASIC,
// SHAPE_RECTANGLE,
// SHAPE_ELLIPSE,
// SHAPE_POLYGON,
// SHAPE_CIRCLE,
// SHAPE_LINE,
// SHAPE_DIVIDED_RECTANGLE,
// SHAPE_COMPOSITE,
// SHAPE_CONTROL_POINT,
// SHAPE_DRAWN,
// SHAPE_DIVISION,
// SHAPE_LABEL_OBJECT,
// SHAPE_BITMAP,
// SHAPE_DIVIDED_OBJECT_CONTROL_POINT,
// OBJECT_REGION,
OP_CLICK_LEFT,
OP_CLICK_RIGHT,
OP_DRAG_LEFT,
OP_DRAG_RIGHT,
OP_ALL,
ATTACHMENT_MODE_NONE,
ATTACHMENT_MODE_EDGE,
ATTACHMENT_MODE_BRANCHING,
BRANCHING_ATTACHMENT_NORMAL,
BRANCHING_ATTACHMENT_BLOB,
gyCONSTRAINT_CENTRED_VERTICALLY,
gyCONSTRAINT_CENTRED_HORIZONTALLY,
gyCONSTRAINT_CENTRED_BOTH,
gyCONSTRAINT_LEFT_OF,
gyCONSTRAINT_RIGHT_OF,
gyCONSTRAINT_ABOVE,
gyCONSTRAINT_BELOW,
gyCONSTRAINT_ALIGNED_TOP,
gyCONSTRAINT_ALIGNED_BOTTOM,
gyCONSTRAINT_ALIGNED_LEFT,
gyCONSTRAINT_ALIGNED_RIGHT,
gyCONSTRAINT_MIDALIGNED_TOP,
gyCONSTRAINT_MIDALIGNED_BOTTOM,
gyCONSTRAINT_MIDALIGNED_LEFT,
gyCONSTRAINT_MIDALIGNED_RIGHT,
DIVISION_SIDE_NONE,
DIVISION_SIDE_LEFT,
DIVISION_SIDE_TOP,
DIVISION_SIDE_RIGHT,
DIVISION_SIDE_BOTTOM,
};
//---------------------------------------------------------------------------
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) {
wxPyBeginBlockThreads();
if (!PyList_Check(pyList)) {
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
wxPyEndBlockThreads();
return NULL;
}
int count = PyList_Size(pyList);
wxList* list = new wxList;
if (! list) {
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
wxPyEndBlockThreads();
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);
wxPyEndBlockThreads();
return NULL;
}
list->Append(wxo);
}
wxPyEndBlockThreads();
return list;
}
//---------------------------------------------------------------------------
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
wxPyBeginBlockThreads();
if (!PyList_Check(pyList)) {
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
wxPyEndBlockThreads();
return NULL;
}
int count = PyList_Size(pyList);
wxList* list = new wxList;
if (! list) {
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
wxPyEndBlockThreads();
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");
wxPyEndBlockThreads();
return NULL;
}
list->Append((wxObject*) new wxRealPoint(*wxo));
}
}
wxPyEndBlockThreads();
return list;
}
//---------------------------------------------------------------------------
PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
PyObject* target = NULL;
if (source && wxIsKindOf(source, wxShapeEvtHandler)) {
// If it's derived from wxShapeEvtHandler then there may
// already be a pointer to a Python object that we can use
// in the OOR data.
wxShapeEvtHandler* seh = (wxShapeEvtHandler*)source;
wxPyOORClientData* data = (wxPyOORClientData*)seh->GetClientObject();
if (data) {
target = data->m_obj;
Py_INCREF(target);
}
}
if (! target) {
target = wxPyMake_wxObject2(source, FALSE);
if (target != Py_None)
((wxShapeEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target));
}
return target;
}
//---------------------------------------------------------------------------
PyObject* wxPy_ConvertShapeList(wxListBase* list, const char* className) {
PyObject* pyList;
PyObject* pyObj;
wxObject* wxObj;
wxNode* node = list->First();
wxPyBeginBlockThreads();
pyList = PyList_New(0);
while (node) {
wxObj = node->Data();
pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj);
PyList_Append(pyList, pyObj);
node = node->Next();
}
wxPyEndBlockThreads();
return pyList;
}
//---------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxPyShapeCanvas, wxShapeCanvas);
IMPLEMENT_DYNAMIC_CLASS(wxPyShapeEvtHandler, wxShapeEvtHandler);
IMPLEMENT_ABSTRACT_CLASS(wxPyShape, wxShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyRectangleShape, wxRectangleShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyControlPoint, wxControlPoint);
IMPLEMENT_DYNAMIC_CLASS(wxPyBitmapShape, wxBitmapShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyDrawnShape, wxDrawnShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyCompositeShape, wxCompositeShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyDividedShape, wxDividedShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyDivisionShape, wxDivisionShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyEllipseShape, wxEllipseShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyCircleShape, wxCircleShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyLineShape, wxLineShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyPolygonShape, wxPolygonShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyTextShape, wxTextShape);
//---------------------------------------------------------------------------
extern "C" SWIGEXPORT(void) initoglbasicc();
extern "C" SWIGEXPORT(void) initoglshapesc();
extern "C" SWIGEXPORT(void) initoglshapes2c();
extern "C" SWIGEXPORT(void) initoglcanvasc();
%}
%init %{
initoglbasicc();
initoglshapesc();
initoglshapes2c();
initoglcanvasc();
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
wxPyPtrTypeMap_Add("wxControlPoint", "wxPyControlPoint");
wxPyPtrTypeMap_Add("wxShapeCanvas", "wxPyShapeCanvas");
wxPyPtrTypeMap_Add("wxShapeEvtHandler", "wxPyShapeEvtHandler");
wxPyPtrTypeMap_Add("wxShape", "wxPyShape");
wxPyPtrTypeMap_Add("wxRectangleShape", "wxPyRectangleShape");
wxPyPtrTypeMap_Add("wxDrawnShape", "wxPyDrawnShape");
wxPyPtrTypeMap_Add("wxCompositeShape", "wxPyCompositeShape");
wxPyPtrTypeMap_Add("wxDividedShape", "wxPyDividedShape");
wxPyPtrTypeMap_Add("wxDivisionShape", "wxPyDivisionShape");
wxPyPtrTypeMap_Add("wxEllipseShape", "wxPyEllipseShape");
wxPyPtrTypeMap_Add("wxCircleShape", "wxPyCircleShape");
wxPyPtrTypeMap_Add("wxLineShape", "wxPyLineShape");
wxPyPtrTypeMap_Add("wxPolygonShape", "wxPyPolygonShape");
wxPyPtrTypeMap_Add("wxTextShape", "wxPyTextShape");
%}
//----------------------------------------------------------------------
// And this gets appended to the shadow class file.
//----------------------------------------------------------------------
%pragma(python) include="_oglextras.py";
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------

View File

@@ -1,172 +0,0 @@
# This file was created automatically by SWIG.
import oglc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
from oglbasic import *
from oglshapes import *
from oglshapes2 import *
from oglcanvas import *
import wx
#-------------- FUNCTION WRAPPERS ------------------
wxOGLInitialize = oglc.wxOGLInitialize
wxOGLCleanUp = oglc.wxOGLCleanUp
#-------------- VARIABLE WRAPPERS ------------------
KEY_SHIFT = oglc.KEY_SHIFT
KEY_CTRL = oglc.KEY_CTRL
ARROW_NONE = oglc.ARROW_NONE
ARROW_END = oglc.ARROW_END
ARROW_BOTH = oglc.ARROW_BOTH
ARROW_MIDDLE = oglc.ARROW_MIDDLE
ARROW_START = oglc.ARROW_START
ARROW_HOLLOW_CIRCLE = oglc.ARROW_HOLLOW_CIRCLE
ARROW_FILLED_CIRCLE = oglc.ARROW_FILLED_CIRCLE
ARROW_ARROW = oglc.ARROW_ARROW
ARROW_SINGLE_OBLIQUE = oglc.ARROW_SINGLE_OBLIQUE
ARROW_DOUBLE_OBLIQUE = oglc.ARROW_DOUBLE_OBLIQUE
ARROW_METAFILE = oglc.ARROW_METAFILE
ARROW_POSITION_END = oglc.ARROW_POSITION_END
ARROW_POSITION_START = oglc.ARROW_POSITION_START
CONTROL_POINT_VERTICAL = oglc.CONTROL_POINT_VERTICAL
CONTROL_POINT_HORIZONTAL = oglc.CONTROL_POINT_HORIZONTAL
CONTROL_POINT_DIAGONAL = oglc.CONTROL_POINT_DIAGONAL
CONTROL_POINT_ENDPOINT_TO = oglc.CONTROL_POINT_ENDPOINT_TO
CONTROL_POINT_ENDPOINT_FROM = oglc.CONTROL_POINT_ENDPOINT_FROM
CONTROL_POINT_LINE = oglc.CONTROL_POINT_LINE
FORMAT_NONE = oglc.FORMAT_NONE
FORMAT_CENTRE_HORIZ = oglc.FORMAT_CENTRE_HORIZ
FORMAT_CENTRE_VERT = oglc.FORMAT_CENTRE_VERT
FORMAT_SIZE_TO_CONTENTS = oglc.FORMAT_SIZE_TO_CONTENTS
LINE_ALIGNMENT_HORIZ = oglc.LINE_ALIGNMENT_HORIZ
LINE_ALIGNMENT_VERT = oglc.LINE_ALIGNMENT_VERT
LINE_ALIGNMENT_TO_NEXT_HANDLE = oglc.LINE_ALIGNMENT_TO_NEXT_HANDLE
LINE_ALIGNMENT_NONE = oglc.LINE_ALIGNMENT_NONE
SHADOW_NONE = oglc.SHADOW_NONE
SHADOW_LEFT = oglc.SHADOW_LEFT
SHADOW_RIGHT = oglc.SHADOW_RIGHT
OP_CLICK_LEFT = oglc.OP_CLICK_LEFT
OP_CLICK_RIGHT = oglc.OP_CLICK_RIGHT
OP_DRAG_LEFT = oglc.OP_DRAG_LEFT
OP_DRAG_RIGHT = oglc.OP_DRAG_RIGHT
OP_ALL = oglc.OP_ALL
ATTACHMENT_MODE_NONE = oglc.ATTACHMENT_MODE_NONE
ATTACHMENT_MODE_EDGE = oglc.ATTACHMENT_MODE_EDGE
ATTACHMENT_MODE_BRANCHING = oglc.ATTACHMENT_MODE_BRANCHING
BRANCHING_ATTACHMENT_NORMAL = oglc.BRANCHING_ATTACHMENT_NORMAL
BRANCHING_ATTACHMENT_BLOB = oglc.BRANCHING_ATTACHMENT_BLOB
gyCONSTRAINT_CENTRED_VERTICALLY = oglc.gyCONSTRAINT_CENTRED_VERTICALLY
gyCONSTRAINT_CENTRED_HORIZONTALLY = oglc.gyCONSTRAINT_CENTRED_HORIZONTALLY
gyCONSTRAINT_CENTRED_BOTH = oglc.gyCONSTRAINT_CENTRED_BOTH
gyCONSTRAINT_LEFT_OF = oglc.gyCONSTRAINT_LEFT_OF
gyCONSTRAINT_RIGHT_OF = oglc.gyCONSTRAINT_RIGHT_OF
gyCONSTRAINT_ABOVE = oglc.gyCONSTRAINT_ABOVE
gyCONSTRAINT_BELOW = oglc.gyCONSTRAINT_BELOW
gyCONSTRAINT_ALIGNED_TOP = oglc.gyCONSTRAINT_ALIGNED_TOP
gyCONSTRAINT_ALIGNED_BOTTOM = oglc.gyCONSTRAINT_ALIGNED_BOTTOM
gyCONSTRAINT_ALIGNED_LEFT = oglc.gyCONSTRAINT_ALIGNED_LEFT
gyCONSTRAINT_ALIGNED_RIGHT = oglc.gyCONSTRAINT_ALIGNED_RIGHT
gyCONSTRAINT_MIDALIGNED_TOP = oglc.gyCONSTRAINT_MIDALIGNED_TOP
gyCONSTRAINT_MIDALIGNED_BOTTOM = oglc.gyCONSTRAINT_MIDALIGNED_BOTTOM
gyCONSTRAINT_MIDALIGNED_LEFT = oglc.gyCONSTRAINT_MIDALIGNED_LEFT
gyCONSTRAINT_MIDALIGNED_RIGHT = oglc.gyCONSTRAINT_MIDALIGNED_RIGHT
DIVISION_SIDE_NONE = oglc.DIVISION_SIDE_NONE
DIVISION_SIDE_LEFT = oglc.DIVISION_SIDE_LEFT
DIVISION_SIDE_TOP = oglc.DIVISION_SIDE_TOP
DIVISION_SIDE_RIGHT = oglc.DIVISION_SIDE_RIGHT
DIVISION_SIDE_BOTTOM = oglc.DIVISION_SIDE_BOTTOM
#-------------- USER INCLUDE -----------------------
# aliases
wxShapeCanvas = wxPyShapeCanvas
wxShapeEvtHandler = wxPyShapeEvtHandler
wxShape = wxPyShape
wxRectangleShape = wxPyRectangleShape
wxBitmapShape = wxPyBitmapShape
wxDrawnShape = wxPyDrawnShape
wxCompositeShape = wxPyCompositeShape
wxDividedShape = wxPyDividedShape
wxDivisionShape = wxPyDivisionShape
wxEllipseShape = wxPyEllipseShape
wxCircleShape = wxPyCircleShape
wxLineShape = wxPyLineShape
wxPolygonShape = wxPyPolygonShape
wxTextShape = wxPyTextShape
wxControlPoint = wxPyControlPoint
# Stuff these names into the wx namespace so wxPyConstructObject can find them
import wx
wx.wxArrowHeadPtr = wxArrowHeadPtr
wx.wxControlPointPtr = wxPyControlPointPtr
wx.wxDiagramPtr = wxDiagramPtr
wx.wxOGLConstraintPtr = wxOGLConstraintPtr
wx.wxPseudoMetaFilePtr = wxPseudoMetaFile
wx.wxPyBitmapShapePtr = wxPyBitmapShapePtr
wx.wxPyCircleShapePtr = wxPyCircleShapePtr
wx.wxPyCompositeShapePtr = wxPyCompositeShapePtr
wx.wxPyControlPointPtr = wxPyControlPointPtr
wx.wxPyDividedShapePtr = wxPyDividedShapePtr
wx.wxPyDivisionShapePtr = wxPyDivisionShapePtr
wx.wxPyDrawnShapePtr = wxPyDrawnShapePtr
wx.wxPyEllipseShapePtr = wxPyEllipseShapePtr
wx.wxPyLineShapePtr = wxPyLineShapePtr
wx.wxPyPolygonShapePtr = wxPyPolygonShapePtr
wx.wxPyRectangleShapePtr = wxPyRectangleShapePtr
wx.wxPyShapeCanvasPtr = wxPyShapeCanvasPtr
wx.wxPyShapeEvtHandlerPtr = wxPyShapeEvtHandlerPtr
wx.wxPyShapePtr = wxPyShapePtr
wx.wxPyTextShapePtr = wxPyTextShapePtr
wx.wxShapeRegionPtr = wxShapeRegionPtr

File diff suppressed because it is too large Load Diff

View File

@@ -1,399 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: oglbasic.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 3-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module oglbasic
%{
#include "wxPython.h"
#include "oglhelpers.h"
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%import windows.i
%extern _defs.i
%extern misc.i
%extern gdi.i
%include _ogldefs.i
//%extern oglcanvas.i
%pragma(python) code = "import wx"
%pragma(python) code = "from oglcanvas import wxPyShapeCanvasPtr"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxShapeRegion : public wxObject {
public:
wxShapeRegion();
//~wxShapeRegion();
void SetText(const wxString& s);
void SetFont(wxFont *f);
void SetMinSize(double w, double h);
void SetSize(double w, double h);
void SetPosition(double x, double y);
void SetProportions(double x, double y);
void SetFormatMode(int mode);
void SetName(const wxString& s);
void SetColour(const wxString& col);
wxString GetText();
wxFont *GetFont();
void GetMinSize(double *OUTPUT, double *OUTPUT);
void GetProportion(double *OUTPUT, double *OUTPUT);
void GetSize(double *OUTPUT, double *OUTPUT);
void GetPosition(double *OUTPUT, double *OUTPUT);
int GetFormatMode();
wxString GetName();
wxString GetColour();
wxColour *GetActualColourObject();
wxList& GetFormattedText();
wxString GetPenColour();
int GetPenStyle();
void SetPenStyle(int style);
void SetPenColour(const wxString& col);
wxPen *GetActualPen();
double GetWidth();
double GetHeight();
void ClearText();
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyShapeEvtHandler,wxShapeEvtHandler);
%}
class wxPyShapeEvtHandler : public wxObject {
public:
wxPyShapeEvtHandler(wxPyShapeEvtHandler *prev = NULL,
wxPyShape *shape = NULL);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShapeEvtHandler)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%addmethods { void Destroy() { delete self; } }
%addmethods {
void _setOORInfo(PyObject* _self) {
self->SetClientObject(new wxPyOORClientData(_self));
}
}
void SetShape(wxPyShape *sh);
wxPyShape *GetShape();
void SetPreviousHandler(wxPyShapeEvtHandler* handler);
wxPyShapeEvtHandler* GetPreviousHandler();
wxPyShapeEvtHandler* CreateNewCopy();
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyShape, wxShape);
%}
class wxPyShape : public wxPyShapeEvtHandler {
public:
// wxPyShape(wxPyShapeCanvas *can = NULL); abstract base class...
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void GetBoundingBoxMax(double *OUTPUT, double *OUTPUT);
void GetBoundingBoxMin(double *OUTPUT, double *OUTPUT);
bool GetPerimeterPoint(double x1, double y1,
double x2, double y2,
double *OUTPUT, double *OUTPUT);
wxPyShapeCanvas *GetCanvas();
void SetCanvas(wxPyShapeCanvas *the_canvas);
void AddToCanvas(wxPyShapeCanvas *the_canvas, wxPyShape *addAfter = NULL);
void InsertInCanvas(wxPyShapeCanvas *the_canvas);
void RemoveFromCanvas(wxPyShapeCanvas *the_canvas);
double GetX();
double GetY();
void SetX(double x);
void SetY(double y);
wxPyShape *GetParent();
void SetParent(wxPyShape *p);
wxPyShape *GetTopAncestor();
// wxList& GetChildren();
%addmethods {
PyObject* GetChildren() {
wxList& list = self->GetChildren();
return wxPy_ConvertShapeList(&list, "wxPyShape");
}
}
void Unlink();
void SetDrawHandles(bool drawH);
bool GetDrawHandles();
void MakeControlPoints();
void DeleteControlPoints(wxDC *dc = NULL);
void ResetControlPoints();
wxPyShapeEvtHandler *GetEventHandler();
void SetEventHandler(wxPyShapeEvtHandler *handler);
void MakeMandatoryControlPoints();
void ResetMandatoryControlPoints();
bool Recompute();
void CalculateSize();
void Select(bool select = TRUE, wxDC* dc = NULL);
void SetHighlight(bool hi = TRUE, bool recurse = FALSE);
bool IsHighlighted() ;
bool Selected();
bool AncestorSelected();
void SetSensitivityFilter(int sens = OP_ALL, bool recursive = FALSE);
int GetSensitivityFilter();
void SetDraggable(bool drag, bool recursive = FALSE);
void SetFixedSize(bool x, bool y);
void GetFixedSize(bool *OUTPUT, bool *OUTPUT) ;
bool GetFixedWidth();
bool GetFixedHeight();
void SetSpaceAttachments(bool sp);
bool GetSpaceAttachments() ;
void SetShadowMode(int mode, bool redraw = FALSE);
int GetShadowMode();
bool HitTest(double x, double y, int *OUTPUT, double *OUTPUT);
void SetCentreResize(bool cr);
bool GetCentreResize();
void SetMaintainAspectRatio(bool ar);
bool GetMaintainAspectRatio();
// wxList& GetLines();
%addmethods {
PyObject* GetLines() {
wxList& list = self->GetLines();
return wxPy_ConvertShapeList(&list, "wxPyLineShape");
}
}
void SetDisableLabel(bool flag);
bool GetDisableLabel();
void SetAttachmentMode(int mode);
int GetAttachmentMode();
void SetId(long i);
long GetId();
void SetPen(wxPen *pen);
void SetBrush(wxBrush *brush);
// void SetClientData(wxObject *client_data);
// wxObject *GetClientData();
// The real client data methods are being used for OOR, so just fake it.
%pragma(python) addtoclass = "
def SetClientData(self, data):
self.clientData = data
def GetClientData(self):
if hasattr(self, 'clientData'):
return self.clientData
else:
return None
"
void Show(bool show);
bool IsShown();
void Move(wxDC& dc, double x1, double y1, bool display = TRUE);
void Erase(wxDC& dc);
void EraseContents(wxDC& dc);
void Draw(wxDC& dc);
void Flash();
void MoveLinks(wxDC& dc);
void DrawContents(wxDC& dc);
void SetSize(double x, double y, bool recursive = TRUE);
void SetAttachmentSize(double x, double y);
void Attach(wxPyShapeCanvas *can);
void Detach();
bool Constrain();
void AddLine(wxPyLineShape *line, wxPyShape *other,
int attachFrom = 0, int attachTo = 0,
int positionFrom = -1, int positionTo = -1);
int GetLinePosition(wxPyLineShape* line);
void AddText(const wxString& string);
wxPen *GetPen();
wxBrush *GetBrush();
void SetDefaultRegionSize();
void FormatText(wxDC& dc, const wxString& s, int regionId = 0);
void SetFormatMode(int mode, int regionId = 0);
int GetFormatMode(int regionId = 0);
void SetFont(wxFont *font, int regionId = 0);
wxFont *GetFont(int regionId = 0);
void SetTextColour(const wxString& colour, int regionId = 0);
wxString GetTextColour(int regionId = 0);
int GetNumberOfTextRegions();
void SetRegionName(const wxString& name, int regionId = 0);
wxString GetRegionName(int regionId);
int GetRegionId(const wxString& name);
void NameRegions(const wxString& parentName = "");
// wxList& GetRegions();
%addmethods {
PyObject* GetRegions() {
wxList& list = self->GetRegions();
return wxPy_ConvertList(&list, "wxShapeRegion");
}
}
void AddRegion(wxShapeRegion *region);
void ClearRegions();
void AssignNewIds();
wxPyShape *FindRegion(const wxString& regionName, int *OUTPUT);
void FindRegionNames(wxStringList& list);
void ClearText(int regionId = 0);
void RemoveLine(wxPyLineShape *line);
#ifdef wxUSE_PROLOGIO
void WriteAttributes(wxExpr *clause);
void ReadAttributes(wxExpr *clause);
void ReadConstraints(wxExpr *clause, wxExprDatabase *database);
void WriteRegions(wxExpr *clause);
void ReadRegions(wxExpr *clause);
#endif
bool GetAttachmentPosition(int attachment, double *OUTPUT, double *OUTPUT,
int nth = 0, int no_arcs = 1, wxPyLineShape *line = NULL);
int GetNumberOfAttachments();
bool AttachmentIsValid(int attachment);
bool GetAttachmentPositionEdge(int attachment, double *OUTPUT, double *OUTPUT,
int nth = 0, int no_arcs = 1, wxPyLineShape *line = NULL);
wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2,
int nth, int noArcs, wxPyLineShape* line);
bool AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2);
void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = FALSE);
void DrawLinks(wxDC& dc, int attachment = -1, bool recurse = FALSE);
bool MoveLineToNewAttachment(wxDC& dc, wxPyLineShape *to_move,
double x, double y);
//void ApplyAttachmentOrdering(wxList& linesToSort);
%addmethods {
void ApplyAttachmentOrdering(PyObject* linesToSort) {
wxList* list = wxPy_wxListHelper(linesToSort, "_wxPyLineShape_p");
self->ApplyAttachmentOrdering(*list);
delete list;
}
}
wxRealPoint GetBranchingAttachmentRoot(int attachment);
bool GetBranchingAttachmentInfo(int attachment, wxRealPoint& root, wxRealPoint& neck,
wxRealPoint& shoulder1, wxRealPoint& shoulder2);
bool GetBranchingAttachmentPoint(int attachment, int n, wxRealPoint& attachmentPoint,
wxRealPoint& stemPoint);
int GetAttachmentLineCount(int attachment);
void SetBranchNeckLength(int len);
int GetBranchNeckLength();
void SetBranchStemLength(int len);
int GetBranchStemLength();
void SetBranchSpacing(int len);
int GetBranchSpacing();
void SetBranchStyle(long style);
long GetBranchStyle();
int PhysicalToLogicalAttachment(int physicalAttachment);
int LogicalToPhysicalAttachment(int logicalAttachment);
bool Draggable();
bool HasDescendant(wxPyShape *image);
wxPyShape *CreateNewCopy(bool resetMapping = TRUE, bool recompute = TRUE);
void Copy(wxPyShape& copy);
void CopyWithHandler(wxPyShape& copy);
void Rotate(double x, double y, double theta);
double GetRotation();
void ClearAttachments();
void Recentre(wxDC& dc);
void ClearPointList(wxList& list);
wxPen GetBackgroundPen();
wxBrush GetBackgroundBrush();
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------

View File

@@ -1,803 +0,0 @@
# This file was created automatically by SWIG.
import oglbasicc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
import wx
from oglcanvas import wxPyShapeCanvasPtr
class wxShapeRegionPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def SetText(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetText,(self,) + _args, _kwargs)
return val
def SetFont(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetFont,(self,) + _args, _kwargs)
return val
def SetMinSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetMinSize,(self,) + _args, _kwargs)
return val
def SetSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetSize,(self,) + _args, _kwargs)
return val
def SetPosition(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetPosition,(self,) + _args, _kwargs)
return val
def SetProportions(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetProportions,(self,) + _args, _kwargs)
return val
def SetFormatMode(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetFormatMode,(self,) + _args, _kwargs)
return val
def SetName(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetName,(self,) + _args, _kwargs)
return val
def SetColour(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetColour,(self,) + _args, _kwargs)
return val
def GetText(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetText,(self,) + _args, _kwargs)
return val
def GetFont(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetFont,(self,) + _args, _kwargs)
if val: val = wxFontPtr(val)
return val
def GetMinSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetMinSize,(self,) + _args, _kwargs)
return val
def GetProportion(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetProportion,(self,) + _args, _kwargs)
return val
def GetSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetSize,(self,) + _args, _kwargs)
return val
def GetPosition(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetPosition,(self,) + _args, _kwargs)
return val
def GetFormatMode(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetFormatMode,(self,) + _args, _kwargs)
return val
def GetName(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetName,(self,) + _args, _kwargs)
return val
def GetColour(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetColour,(self,) + _args, _kwargs)
return val
def GetActualColourObject(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetActualColourObject,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
return val
def GetFormattedText(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetFormattedText,(self,) + _args, _kwargs)
return val
def GetPenColour(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetPenColour,(self,) + _args, _kwargs)
return val
def GetPenStyle(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetPenStyle,(self,) + _args, _kwargs)
return val
def SetPenStyle(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetPenStyle,(self,) + _args, _kwargs)
return val
def SetPenColour(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_SetPenColour,(self,) + _args, _kwargs)
return val
def GetActualPen(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetActualPen,(self,) + _args, _kwargs)
if val: val = wxPenPtr(val)
return val
def GetWidth(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetWidth,(self,) + _args, _kwargs)
return val
def GetHeight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_GetHeight,(self,) + _args, _kwargs)
return val
def ClearText(self, *_args, **_kwargs):
val = apply(oglbasicc.wxShapeRegion_ClearText,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxShapeRegion instance at %s>" % (self.this,)
class wxShapeRegion(wxShapeRegionPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(oglbasicc.new_wxShapeRegion,_args,_kwargs)
self.thisown = 1
class wxPyShapeEvtHandlerPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler__setCallbackInfo,(self,) + _args, _kwargs)
return val
def Destroy(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_Destroy,(self,) + _args, _kwargs)
return val
def _setOORInfo(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler__setOORInfo,(self,) + _args, _kwargs)
return val
def SetShape(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_SetShape,(self,) + _args, _kwargs)
return val
def GetShape(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_GetShape,(self,) + _args, _kwargs)
return val
def SetPreviousHandler(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_SetPreviousHandler,(self,) + _args, _kwargs)
return val
def GetPreviousHandler(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_GetPreviousHandler,(self,) + _args, _kwargs)
return val
def CreateNewCopy(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_CreateNewCopy,(self,) + _args, _kwargs)
return val
def base_OnDelete(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDelete,(self,) + _args, _kwargs)
return val
def base_OnDraw(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDraw,(self,) + _args, _kwargs)
return val
def base_OnDrawContents(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDrawContents,(self,) + _args, _kwargs)
return val
def base_OnDrawBranches(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDrawBranches,(self,) + _args, _kwargs)
return val
def base_OnMoveLinks(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnMoveLinks,(self,) + _args, _kwargs)
return val
def base_OnErase(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnErase,(self,) + _args, _kwargs)
return val
def base_OnEraseContents(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnEraseContents,(self,) + _args, _kwargs)
return val
def base_OnHighlight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnHighlight,(self,) + _args, _kwargs)
return val
def base_OnLeftClick(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnLeftClick,(self,) + _args, _kwargs)
return val
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
return val
def base_OnRightClick(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnRightClick,(self,) + _args, _kwargs)
return val
def base_OnSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnSize,(self,) + _args, _kwargs)
return val
def base_OnMovePre(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnMovePre,(self,) + _args, _kwargs)
return val
def base_OnMovePost(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnMovePost,(self,) + _args, _kwargs)
return val
def base_OnDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnEndDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnDragRight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDragRight,(self,) + _args, _kwargs)
return val
def base_OnBeginDragRight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnBeginDragRight,(self,) + _args, _kwargs)
return val
def base_OnEndDragRight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnEndDragRight,(self,) + _args, _kwargs)
return val
def base_OnDrawOutline(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDrawOutline,(self,) + _args, _kwargs)
return val
def base_OnDrawControlPoints(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDrawControlPoints,(self,) + _args, _kwargs)
return val
def base_OnEraseControlPoints(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnEraseControlPoints,(self,) + _args, _kwargs)
return val
def base_OnMoveLink(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnMoveLink,(self,) + _args, _kwargs)
return val
def base_OnSizingDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnSizingDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnBeginSize,(self,) + _args, _kwargs)
return val
def base_OnEndSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnEndSize,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxPyShapeEvtHandler instance at %s>" % (self.this,)
class wxPyShapeEvtHandler(wxPyShapeEvtHandlerPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(oglbasicc.new_wxPyShapeEvtHandler,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyShapeEvtHandler)
self._setOORInfo(self)
class wxPyShapePtr(wxPyShapeEvtHandlerPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape__setCallbackInfo,(self,) + _args, _kwargs)
return val
def GetBoundingBoxMax(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBoundingBoxMax,(self,) + _args, _kwargs)
return val
def GetBoundingBoxMin(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBoundingBoxMin,(self,) + _args, _kwargs)
return val
def GetPerimeterPoint(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetPerimeterPoint,(self,) + _args, _kwargs)
return val
def GetCanvas(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetCanvas,(self,) + _args, _kwargs)
return val
def SetCanvas(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetCanvas,(self,) + _args, _kwargs)
return val
def AddToCanvas(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_AddToCanvas,(self,) + _args, _kwargs)
return val
def InsertInCanvas(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_InsertInCanvas,(self,) + _args, _kwargs)
return val
def RemoveFromCanvas(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_RemoveFromCanvas,(self,) + _args, _kwargs)
return val
def GetX(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetX,(self,) + _args, _kwargs)
return val
def GetY(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetY,(self,) + _args, _kwargs)
return val
def SetX(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetX,(self,) + _args, _kwargs)
return val
def SetY(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetY,(self,) + _args, _kwargs)
return val
def GetParent(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetParent,(self,) + _args, _kwargs)
return val
def SetParent(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetParent,(self,) + _args, _kwargs)
return val
def GetTopAncestor(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetTopAncestor,(self,) + _args, _kwargs)
return val
def GetChildren(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetChildren,(self,) + _args, _kwargs)
return val
def Unlink(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Unlink,(self,) + _args, _kwargs)
return val
def SetDrawHandles(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetDrawHandles,(self,) + _args, _kwargs)
return val
def GetDrawHandles(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetDrawHandles,(self,) + _args, _kwargs)
return val
def MakeControlPoints(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_MakeControlPoints,(self,) + _args, _kwargs)
return val
def DeleteControlPoints(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_DeleteControlPoints,(self,) + _args, _kwargs)
return val
def ResetControlPoints(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_ResetControlPoints,(self,) + _args, _kwargs)
return val
def GetEventHandler(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetEventHandler,(self,) + _args, _kwargs)
return val
def SetEventHandler(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetEventHandler,(self,) + _args, _kwargs)
return val
def MakeMandatoryControlPoints(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_MakeMandatoryControlPoints,(self,) + _args, _kwargs)
return val
def ResetMandatoryControlPoints(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_ResetMandatoryControlPoints,(self,) + _args, _kwargs)
return val
def Recompute(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Recompute,(self,) + _args, _kwargs)
return val
def CalculateSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_CalculateSize,(self,) + _args, _kwargs)
return val
def Select(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Select,(self,) + _args, _kwargs)
return val
def SetHighlight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetHighlight,(self,) + _args, _kwargs)
return val
def IsHighlighted(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_IsHighlighted,(self,) + _args, _kwargs)
return val
def Selected(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Selected,(self,) + _args, _kwargs)
return val
def AncestorSelected(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_AncestorSelected,(self,) + _args, _kwargs)
return val
def SetSensitivityFilter(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetSensitivityFilter,(self,) + _args, _kwargs)
return val
def GetSensitivityFilter(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetSensitivityFilter,(self,) + _args, _kwargs)
return val
def SetDraggable(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetDraggable,(self,) + _args, _kwargs)
return val
def SetFixedSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetFixedSize,(self,) + _args, _kwargs)
return val
def GetFixedSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetFixedSize,(self,) + _args, _kwargs)
return val
def GetFixedWidth(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetFixedWidth,(self,) + _args, _kwargs)
return val
def GetFixedHeight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetFixedHeight,(self,) + _args, _kwargs)
return val
def SetSpaceAttachments(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetSpaceAttachments,(self,) + _args, _kwargs)
return val
def GetSpaceAttachments(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetSpaceAttachments,(self,) + _args, _kwargs)
return val
def SetShadowMode(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetShadowMode,(self,) + _args, _kwargs)
return val
def GetShadowMode(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetShadowMode,(self,) + _args, _kwargs)
return val
def HitTest(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_HitTest,(self,) + _args, _kwargs)
return val
def SetCentreResize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetCentreResize,(self,) + _args, _kwargs)
return val
def GetCentreResize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetCentreResize,(self,) + _args, _kwargs)
return val
def SetMaintainAspectRatio(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetMaintainAspectRatio,(self,) + _args, _kwargs)
return val
def GetMaintainAspectRatio(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetMaintainAspectRatio,(self,) + _args, _kwargs)
return val
def GetLines(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetLines,(self,) + _args, _kwargs)
return val
def SetDisableLabel(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetDisableLabel,(self,) + _args, _kwargs)
return val
def GetDisableLabel(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetDisableLabel,(self,) + _args, _kwargs)
return val
def SetAttachmentMode(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetAttachmentMode,(self,) + _args, _kwargs)
return val
def GetAttachmentMode(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetAttachmentMode,(self,) + _args, _kwargs)
return val
def SetId(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetId,(self,) + _args, _kwargs)
return val
def GetId(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetId,(self,) + _args, _kwargs)
return val
def SetPen(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetPen,(self,) + _args, _kwargs)
return val
def SetBrush(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetBrush,(self,) + _args, _kwargs)
return val
def Show(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Show,(self,) + _args, _kwargs)
return val
def IsShown(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_IsShown,(self,) + _args, _kwargs)
return val
def Move(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Move,(self,) + _args, _kwargs)
return val
def Erase(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Erase,(self,) + _args, _kwargs)
return val
def EraseContents(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_EraseContents,(self,) + _args, _kwargs)
return val
def Draw(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Draw,(self,) + _args, _kwargs)
return val
def Flash(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Flash,(self,) + _args, _kwargs)
return val
def MoveLinks(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_MoveLinks,(self,) + _args, _kwargs)
return val
def DrawContents(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_DrawContents,(self,) + _args, _kwargs)
return val
def SetSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetSize,(self,) + _args, _kwargs)
return val
def SetAttachmentSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetAttachmentSize,(self,) + _args, _kwargs)
return val
def Attach(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Attach,(self,) + _args, _kwargs)
return val
def Detach(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Detach,(self,) + _args, _kwargs)
return val
def Constrain(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Constrain,(self,) + _args, _kwargs)
return val
def AddLine(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_AddLine,(self,) + _args, _kwargs)
return val
def GetLinePosition(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetLinePosition,(self,) + _args, _kwargs)
return val
def AddText(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_AddText,(self,) + _args, _kwargs)
return val
def GetPen(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetPen,(self,) + _args, _kwargs)
if val: val = wxPenPtr(val)
return val
def GetBrush(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBrush,(self,) + _args, _kwargs)
if val: val = wxBrushPtr(val)
return val
def SetDefaultRegionSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetDefaultRegionSize,(self,) + _args, _kwargs)
return val
def FormatText(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_FormatText,(self,) + _args, _kwargs)
return val
def SetFormatMode(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetFormatMode,(self,) + _args, _kwargs)
return val
def GetFormatMode(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetFormatMode,(self,) + _args, _kwargs)
return val
def SetFont(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetFont,(self,) + _args, _kwargs)
return val
def GetFont(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetFont,(self,) + _args, _kwargs)
if val: val = wxFontPtr(val)
return val
def SetTextColour(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetTextColour,(self,) + _args, _kwargs)
return val
def GetTextColour(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetTextColour,(self,) + _args, _kwargs)
return val
def GetNumberOfTextRegions(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetNumberOfTextRegions,(self,) + _args, _kwargs)
return val
def SetRegionName(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetRegionName,(self,) + _args, _kwargs)
return val
def GetRegionName(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetRegionName,(self,) + _args, _kwargs)
return val
def GetRegionId(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetRegionId,(self,) + _args, _kwargs)
return val
def NameRegions(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_NameRegions,(self,) + _args, _kwargs)
return val
def GetRegions(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetRegions,(self,) + _args, _kwargs)
return val
def AddRegion(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_AddRegion,(self,) + _args, _kwargs)
return val
def ClearRegions(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_ClearRegions,(self,) + _args, _kwargs)
return val
def AssignNewIds(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_AssignNewIds,(self,) + _args, _kwargs)
return val
def FindRegion(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_FindRegion,(self,) + _args, _kwargs)
return val
def FindRegionNames(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_FindRegionNames,(self,) + _args, _kwargs)
return val
def ClearText(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_ClearText,(self,) + _args, _kwargs)
return val
def RemoveLine(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_RemoveLine,(self,) + _args, _kwargs)
return val
def GetAttachmentPosition(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetAttachmentPosition,(self,) + _args, _kwargs)
return val
def GetNumberOfAttachments(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetNumberOfAttachments,(self,) + _args, _kwargs)
return val
def AttachmentIsValid(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_AttachmentIsValid,(self,) + _args, _kwargs)
return val
def GetAttachmentPositionEdge(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetAttachmentPositionEdge,(self,) + _args, _kwargs)
return val
def CalcSimpleAttachment(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_CalcSimpleAttachment,(self,) + _args, _kwargs)
if val: val = wxRealPointPtr(val) ; val.thisown = 1
return val
def AttachmentSortTest(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_AttachmentSortTest,(self,) + _args, _kwargs)
return val
def EraseLinks(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_EraseLinks,(self,) + _args, _kwargs)
return val
def DrawLinks(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_DrawLinks,(self,) + _args, _kwargs)
return val
def MoveLineToNewAttachment(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_MoveLineToNewAttachment,(self,) + _args, _kwargs)
return val
def ApplyAttachmentOrdering(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_ApplyAttachmentOrdering,(self,) + _args, _kwargs)
return val
def GetBranchingAttachmentRoot(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBranchingAttachmentRoot,(self,) + _args, _kwargs)
if val: val = wxRealPointPtr(val) ; val.thisown = 1
return val
def GetBranchingAttachmentInfo(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBranchingAttachmentInfo,(self,) + _args, _kwargs)
return val
def GetBranchingAttachmentPoint(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBranchingAttachmentPoint,(self,) + _args, _kwargs)
return val
def GetAttachmentLineCount(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetAttachmentLineCount,(self,) + _args, _kwargs)
return val
def SetBranchNeckLength(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetBranchNeckLength,(self,) + _args, _kwargs)
return val
def GetBranchNeckLength(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBranchNeckLength,(self,) + _args, _kwargs)
return val
def SetBranchStemLength(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetBranchStemLength,(self,) + _args, _kwargs)
return val
def GetBranchStemLength(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBranchStemLength,(self,) + _args, _kwargs)
return val
def SetBranchSpacing(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetBranchSpacing,(self,) + _args, _kwargs)
return val
def GetBranchSpacing(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBranchSpacing,(self,) + _args, _kwargs)
return val
def SetBranchStyle(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_SetBranchStyle,(self,) + _args, _kwargs)
return val
def GetBranchStyle(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBranchStyle,(self,) + _args, _kwargs)
return val
def PhysicalToLogicalAttachment(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_PhysicalToLogicalAttachment,(self,) + _args, _kwargs)
return val
def LogicalToPhysicalAttachment(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_LogicalToPhysicalAttachment,(self,) + _args, _kwargs)
return val
def Draggable(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Draggable,(self,) + _args, _kwargs)
return val
def HasDescendant(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_HasDescendant,(self,) + _args, _kwargs)
return val
def CreateNewCopy(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_CreateNewCopy,(self,) + _args, _kwargs)
return val
def Copy(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Copy,(self,) + _args, _kwargs)
return val
def CopyWithHandler(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_CopyWithHandler,(self,) + _args, _kwargs)
return val
def Rotate(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Rotate,(self,) + _args, _kwargs)
return val
def GetRotation(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetRotation,(self,) + _args, _kwargs)
return val
def ClearAttachments(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_ClearAttachments,(self,) + _args, _kwargs)
return val
def Recentre(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_Recentre,(self,) + _args, _kwargs)
return val
def ClearPointList(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_ClearPointList,(self,) + _args, _kwargs)
return val
def GetBackgroundPen(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBackgroundPen,(self,) + _args, _kwargs)
if val: val = wxPenPtr(val) ; val.thisown = 1
return val
def GetBackgroundBrush(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBackgroundBrush,(self,) + _args, _kwargs)
if val: val = wxBrushPtr(val) ; val.thisown = 1
return val
def base_OnDelete(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnDelete,(self,) + _args, _kwargs)
return val
def base_OnDraw(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnDraw,(self,) + _args, _kwargs)
return val
def base_OnDrawContents(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnDrawContents,(self,) + _args, _kwargs)
return val
def base_OnDrawBranches(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnDrawBranches,(self,) + _args, _kwargs)
return val
def base_OnMoveLinks(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnMoveLinks,(self,) + _args, _kwargs)
return val
def base_OnErase(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnErase,(self,) + _args, _kwargs)
return val
def base_OnEraseContents(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnEraseContents,(self,) + _args, _kwargs)
return val
def base_OnHighlight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnHighlight,(self,) + _args, _kwargs)
return val
def base_OnLeftClick(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnLeftClick,(self,) + _args, _kwargs)
return val
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
return val
def base_OnRightClick(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnRightClick,(self,) + _args, _kwargs)
return val
def base_OnSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnSize,(self,) + _args, _kwargs)
return val
def base_OnMovePre(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnMovePre,(self,) + _args, _kwargs)
return val
def base_OnMovePost(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnMovePost,(self,) + _args, _kwargs)
return val
def base_OnDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnEndDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnDragRight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnDragRight,(self,) + _args, _kwargs)
return val
def base_OnBeginDragRight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
return val
def base_OnEndDragRight(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnEndDragRight,(self,) + _args, _kwargs)
return val
def base_OnDrawOutline(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnDrawOutline,(self,) + _args, _kwargs)
return val
def base_OnDrawControlPoints(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
return val
def base_OnEraseControlPoints(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
return val
def base_OnMoveLink(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnMoveLink,(self,) + _args, _kwargs)
return val
def base_OnSizingDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnBeginSize,(self,) + _args, _kwargs)
return val
def base_OnEndSize(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnEndSize,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxPyShape instance at %s>" % (self.this,)
def SetClientData(self, data):
self.clientData = data
def GetClientData(self):
if hasattr(self, 'clientData'):
return self.clientData
else:
return None
class wxPyShape(wxPyShapePtr):
def __init__(self,this):
self.this = this
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------

File diff suppressed because it is too large Load Diff

View File

@@ -1,174 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: oglcanvas.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 7-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module oglcanvas
%{
#include "wxPython.h"
#include "oglhelpers.h"
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%import windows.i
%extern _defs.i
%extern misc.i
%extern gdi.i
%include _ogldefs.i
%import oglbasic.i
%pragma(python) code = "import wx"
//---------------------------------------------------------------------------
%{
// Put some wx default wxChar* values into wxStrings.
DECLARE_DEF_STRING(ShapeCanvasNameStr);
%}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxDiagram : public wxObject {
public:
wxDiagram();
//~wxDiagram();
void AddShape(wxPyShape* shape, wxPyShape *addAfter = NULL);
void Clear(wxDC& dc);
void DeleteAllShapes();
void DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2);
wxPyShape* FindShape(long id);
wxPyShapeCanvas* GetCanvas();
int GetCount();
double GetGridSpacing();
int GetMouseTolerance();
// wxList* GetShapeList();
%addmethods {
PyObject* GetShapeList() {
wxList* list = self->GetShapeList();
return wxPy_ConvertShapeList(list, "wxPyShape");
}
}
bool GetQuickEditMode();
bool GetSnapToGrid();
void InsertShape(wxPyShape *shape);
#ifdef wxUSE_PROLOGIO
bool LoadFile(const wxString& filename);
bool SaveFile(const wxString& filename);
#endif
#ifdef wxUSE_PROLOGIO
// **** Have to deal with wxExpr and wxExprDatabase first...
//void OnDatabaseLoad(wxExprDatabase& database);
//void OnDatabaseSave(wxExprDatabase& database);
//bool OnHeaderLoad(wxExprDatabase& database, wxExpr& expr);
//bool OnHeaderSave(wxExprDatabase& database, wxExpr& expr);
//bool OnShapeLoad(wxExprDatabase& database, wxPyShape& shape, wxExpr& expr);
//bool OnShapeSave(wxExprDatabase& database, wxPyShape& shape, wxExpr& expr);
#endif
#ifdef wxUSE_PROLOGIO
void ReadContainerGeometry(wxExprDatabase& database);
void ReadLines(wxExprDatabase& database);
void ReadNodes(wxExprDatabase& database);
#endif
void RecentreAll(wxDC& dc);
void Redraw(wxDC& dc);
void RemoveAllShapes();
void RemoveShape(wxPyShape* shape);
void SetCanvas(wxPyShapeCanvas* canvas);
void SetGridSpacing(double spacing);
void SetMouseTolerance(int tolerance);
void SetQuickEditMode(bool mode);
void SetSnapToGrid(bool snap);
void ShowAll(bool show);
void Snap(double *INOUT, double *INOUT);
};
//---------------------------------------------------------------------------
%{
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnBeginDragLeft);
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnBeginDragRight);
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnEndDragLeft);
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnEndDragRight);
IMP_PYCALLBACK__BOOL2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnDragLeft);
IMP_PYCALLBACK__BOOL2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnDragRight);
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnLeftClick);
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnRightClick);
%}
class wxPyShapeCanvas : public wxScrolledWindow {
public:
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBORDER,
const wxString& name = wxPyShapeCanvasNameStr);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShapeCanvas)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void AddShape(wxPyShape *shape, wxPyShape *addAfter = NULL);
// **** Need a typemap for wxClassInfo, or implement wxObject, etc.....
wxPyShape* FindShape(double x1, double y, int *OUTPUT,
wxClassInfo *info = NULL, wxPyShape* notImage = NULL);
wxPyShape * FindFirstSensitiveShape(double x1, double y, int *OUTPUT, int op);
wxDiagram* GetDiagram();
bool GetQuickEditMode();
void InsertShape(wxPyShape* shape);
void base_OnBeginDragLeft(double x, double y, int keys = 0);
void base_OnBeginDragRight(double x, double y, int keys = 0);
void base_OnEndDragLeft(double x, double y, int keys = 0);
void base_OnEndDragRight(double x, double y, int keys = 0);
void base_OnDragLeft(bool draw, double x, double y, int keys = 0);
void base_OnDragRight(bool draw, double x, double y, int keys = 0);
void base_OnLeftClick(double x, double y, int keys = 0);
void base_OnRightClick(double x, double y, int keys = 0);
void Redraw(wxDC& dc);
void RemoveShape(wxPyShape *shape);
void SetDiagram(wxDiagram *diagram);
void Snap(double *INOUT, double *INOUT);
%pragma(python) addtoclass = "
def GetShapeList(self):
return self.GetDiagram().GetShapeList()
"
};
//---------------------------------------------------------------------------

View File

@@ -1,218 +0,0 @@
# This file was created automatically by SWIG.
import oglcanvasc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
from oglbasic import *
import wx
class wxDiagramPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def AddShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_AddShape,(self,) + _args, _kwargs)
return val
def Clear(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_Clear,(self,) + _args, _kwargs)
return val
def DeleteAllShapes(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_DeleteAllShapes,(self,) + _args, _kwargs)
return val
def DrawOutline(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_DrawOutline,(self,) + _args, _kwargs)
return val
def FindShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_FindShape,(self,) + _args, _kwargs)
return val
def GetCanvas(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_GetCanvas,(self,) + _args, _kwargs)
return val
def GetCount(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_GetCount,(self,) + _args, _kwargs)
return val
def GetGridSpacing(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_GetGridSpacing,(self,) + _args, _kwargs)
return val
def GetMouseTolerance(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_GetMouseTolerance,(self,) + _args, _kwargs)
return val
def GetShapeList(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_GetShapeList,(self,) + _args, _kwargs)
return val
def GetQuickEditMode(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_GetQuickEditMode,(self,) + _args, _kwargs)
return val
def GetSnapToGrid(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_GetSnapToGrid,(self,) + _args, _kwargs)
return val
def InsertShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_InsertShape,(self,) + _args, _kwargs)
return val
def RecentreAll(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_RecentreAll,(self,) + _args, _kwargs)
return val
def Redraw(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_Redraw,(self,) + _args, _kwargs)
return val
def RemoveAllShapes(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_RemoveAllShapes,(self,) + _args, _kwargs)
return val
def RemoveShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_RemoveShape,(self,) + _args, _kwargs)
return val
def SetCanvas(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_SetCanvas,(self,) + _args, _kwargs)
return val
def SetGridSpacing(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_SetGridSpacing,(self,) + _args, _kwargs)
return val
def SetMouseTolerance(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_SetMouseTolerance,(self,) + _args, _kwargs)
return val
def SetQuickEditMode(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_SetQuickEditMode,(self,) + _args, _kwargs)
return val
def SetSnapToGrid(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_SetSnapToGrid,(self,) + _args, _kwargs)
return val
def ShowAll(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_ShowAll,(self,) + _args, _kwargs)
return val
def Snap(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxDiagram_Snap,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxDiagram instance at %s>" % (self.this,)
class wxDiagram(wxDiagramPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(oglcanvasc.new_wxDiagram,_args,_kwargs)
self.thisown = 1
class wxPyShapeCanvasPtr(wxScrolledWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas__setCallbackInfo,(self,) + _args, _kwargs)
return val
def AddShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_AddShape,(self,) + _args, _kwargs)
return val
def FindShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_FindShape,(self,) + _args, _kwargs)
return val
def FindFirstSensitiveShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_FindFirstSensitiveShape,(self,) + _args, _kwargs)
return val
def GetDiagram(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_GetDiagram,(self,) + _args, _kwargs)
return val
def GetQuickEditMode(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_GetQuickEditMode,(self,) + _args, _kwargs)
return val
def InsertShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_InsertShape,(self,) + _args, _kwargs)
return val
def base_OnBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginDragRight(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnBeginDragRight,(self,) + _args, _kwargs)
return val
def base_OnEndDragLeft(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnEndDragRight(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnEndDragRight,(self,) + _args, _kwargs)
return val
def base_OnDragLeft(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnDragLeft,(self,) + _args, _kwargs)
return val
def base_OnDragRight(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnDragRight,(self,) + _args, _kwargs)
return val
def base_OnLeftClick(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnLeftClick,(self,) + _args, _kwargs)
return val
def base_OnRightClick(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnRightClick,(self,) + _args, _kwargs)
return val
def Redraw(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_Redraw,(self,) + _args, _kwargs)
return val
def RemoveShape(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_RemoveShape,(self,) + _args, _kwargs)
return val
def SetDiagram(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_SetDiagram,(self,) + _args, _kwargs)
return val
def Snap(self, *_args, **_kwargs):
val = apply(oglcanvasc.wxPyShapeCanvas_Snap,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxPyShapeCanvas instance at %s>" % (self.this,)
def GetShapeList(self):
return self.GetDiagram().GetShapeList()
class wxPyShapeCanvas(wxPyShapeCanvasPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(oglcanvasc.new_wxPyShapeCanvas,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyShapeCanvas)
self._setOORInfo(self)
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------

View File

@@ -1,281 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: oglhelpers.h
// Purpose: Some Helper functions to help in data conversions in OGL
//
// Author: Robin Dunn
//
// Created: 9-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __wxp_ogl_helpers__
#define __wxp_ogl_helpers__
#include <wx/ogl/ogl.h>
#include <wx/ogl/basicp.h>
#include <wx/ogl/constrnt.h>
#include <wx/ogl/bmpshape.h>
#include <wx/ogl/drawn.h>
//---------------------------------------------------------------------------
// Define a macro that will be used in the class definintions below
#define WXSHAPE_DEC_CALLBACKS() \
DEC_PYCALLBACK__ (OnDelete); \
DEC_PYCALLBACK__DC (OnDraw); \
DEC_PYCALLBACK__DC (OnDrawContents); \
DEC_PYCALLBACK__DCBOOL (OnDrawBranches); \
DEC_PYCALLBACK__DC (OnMoveLinks); \
DEC_PYCALLBACK__DC (OnErase); \
DEC_PYCALLBACK__DC (OnEraseContents); \
DEC_PYCALLBACK__DC (OnHighlight); \
DEC_PYCALLBACK__2DBL2INT (OnLeftClick); \
DEC_PYCALLBACK__2DBL2INT (OnLeftDoubleClick); \
DEC_PYCALLBACK__2DBL2INT (OnRightClick); \
DEC_PYCALLBACK__2DBL (OnSize); \
DEC_PYCALLBACK_BOOL_DC4DBLBOOL (OnMovePre); \
DEC_PYCALLBACK__DC4DBLBOOL (OnMovePost); \
DEC_PYCALLBACK__BOOL2DBL2INT (OnDragLeft); \
DEC_PYCALLBACK__2DBL2INT (OnBeginDragLeft); \
DEC_PYCALLBACK__2DBL2INT (OnEndDragLeft); \
DEC_PYCALLBACK__BOOL2DBL2INT (OnDragRight); \
DEC_PYCALLBACK__2DBL2INT (OnBeginDragRight); \
DEC_PYCALLBACK__2DBL2INT (OnEndDragRight); \
DEC_PYCALLBACK__DC4DBL (OnDrawOutline); \
DEC_PYCALLBACK__DC (OnDrawControlPoints); \
DEC_PYCALLBACK__DC (OnEraseControlPoints); \
DEC_PYCALLBACK__DCBOOL (OnMoveLink); \
DEC_PYCALLBACK__WXCPBOOL2DBL2INT(OnSizingDragLeft); \
DEC_PYCALLBACK__WXCP2DBL2INT (OnSizingBeginDragLeft);\
DEC_PYCALLBACK__WXCP2DBL2INT (OnSizingEndDragLeft); \
DEC_PYCALLBACK__2DBL (OnBeginSize); \
DEC_PYCALLBACK__2DBL (OnEndSize); \
\
PYPRIVATE;
#define WXSHAPE_IMP_CALLBACKS(CLASS, PARENT) \
IMP_PYCALLBACK__ (CLASS, PARENT, OnDelete); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnDraw); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnDrawContents); \
IMP_PYCALLBACK__DCBOOL (CLASS, PARENT, OnDrawBranches); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnMoveLinks); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnErase); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnEraseContents); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnHighlight); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnLeftClick); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnLeftDoubleClick); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnRightClick); \
IMP_PYCALLBACK__2DBL (CLASS, PARENT, OnSize); \
IMP_PYCALLBACK_BOOL_DC4DBLBOOL (CLASS, PARENT, OnMovePre); \
IMP_PYCALLBACK__DC4DBLBOOL (CLASS, PARENT, OnMovePost); \
IMP_PYCALLBACK__BOOL2DBL2INT (CLASS, PARENT, OnDragLeft); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnBeginDragLeft); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnEndDragLeft); \
IMP_PYCALLBACK__BOOL2DBL2INT (CLASS, PARENT, OnDragRight); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnBeginDragRight); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnEndDragRight); \
IMP_PYCALLBACK__DC4DBL (CLASS, PARENT, OnDrawOutline); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnDrawControlPoints); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnEraseControlPoints); \
IMP_PYCALLBACK__DCBOOL (CLASS, PARENT, OnMoveLink); \
IMP_PYCALLBACK__WXCPBOOL2DBL2INT(CLASS, PARENT, OnSizingDragLeft); \
IMP_PYCALLBACK__WXCP2DBL2INT (CLASS, PARENT, OnSizingBeginDragLeft);\
IMP_PYCALLBACK__WXCP2DBL2INT (CLASS, PARENT, OnSizingEndDragLeft); \
IMP_PYCALLBACK__2DBL (CLASS, PARENT, OnBeginSize); \
IMP_PYCALLBACK__2DBL (CLASS, PARENT, OnEndSize); \
// This one may be difficult...
//PYCALLBACK__??????? (PARENT, OnChangeAttachment);
//---------------------------------------------------------------------------
// These are prototypes of some helper functions found in ogl.i
wxList* wxPy_wxListHelper(PyObject* pyList, char* className);
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList);
PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source);
PyObject* wxPy_ConvertShapeList(wxListBase* list, const char* className);
//---------------------------------------------------------------------------
// Classes that derive from the shapes and such, but which know how to turn
// virtual callbacks into Python callbacks.
class wxPyShapeCanvas : public wxShapeCanvas {
DECLARE_DYNAMIC_CLASS(wxPyShapeCanvas);
public:
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBORDER,
const wxString& name = wxT("shapeCanvas"))
: wxShapeCanvas(parent, id, pos, size, style, name) {}
DEC_PYCALLBACK__2DBLINT(OnBeginDragLeft);
DEC_PYCALLBACK__2DBLINT(OnBeginDragRight);
DEC_PYCALLBACK__2DBLINT(OnEndDragLeft);
DEC_PYCALLBACK__2DBLINT(OnEndDragRight);
DEC_PYCALLBACK__BOOL2DBLINT(OnDragLeft);
DEC_PYCALLBACK__BOOL2DBLINT(OnDragRight);
DEC_PYCALLBACK__2DBLINT(OnLeftClick);
DEC_PYCALLBACK__2DBLINT(OnRightClick);
PYPRIVATE;
};
class wxPyShapeEvtHandler : public wxShapeEvtHandler {
DECLARE_DYNAMIC_CLASS(wxPyShapeEvtHandler);
public:
wxPyShapeEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL)
: wxShapeEvtHandler(prev, shape) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyShape : public wxShape {
DECLARE_ABSTRACT_CLASS(wxPyShape);
public:
wxPyShape(wxPyShapeCanvas *can = NULL)
: wxShape(can) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyRectangleShape : public wxRectangleShape {
DECLARE_DYNAMIC_CLASS(wxPyRectangleShape);
public:
wxPyRectangleShape(double width = 0.0, double height = 0.0)
: wxRectangleShape(width, height) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyControlPoint : public wxControlPoint {
DECLARE_DYNAMIC_CLASS(wxPyControlPoint);
public:
wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
wxPyShape *object = NULL,
double size = 0.0, double the_xoffset = 0.0,
double the_yoffset = 0.0, int the_type = 0)
: wxControlPoint(the_canvas, object, size,
the_xoffset, the_yoffset, the_type) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyBitmapShape : public wxBitmapShape {
DECLARE_DYNAMIC_CLASS(wxPyBitmapShape);
public:
wxPyBitmapShape() : wxBitmapShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyDrawnShape : public wxDrawnShape {
DECLARE_DYNAMIC_CLASS(wxPyDrawnShape);
public:
wxPyDrawnShape() : wxDrawnShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyCompositeShape : public wxCompositeShape {
DECLARE_DYNAMIC_CLASS(wxPyCompositeShape);
public:
wxPyCompositeShape() : wxCompositeShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyDividedShape : public wxDividedShape {
DECLARE_DYNAMIC_CLASS(wxPyDividedShape);
public:
wxPyDividedShape(double width = 0.0, double height = 0.0)
: wxDividedShape(width, height) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyDivisionShape : public wxDivisionShape {
DECLARE_DYNAMIC_CLASS(wxPyDivisionShape);
public:
wxPyDivisionShape() : wxDivisionShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyEllipseShape : public wxEllipseShape {
DECLARE_DYNAMIC_CLASS(wxPyEllipseShape);
public:
wxPyEllipseShape(double width = 0.0, double height = 0.0)
: wxEllipseShape(width, height) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyCircleShape : public wxCircleShape {
DECLARE_DYNAMIC_CLASS(wxPyCircleShape);
public:
wxPyCircleShape(double width = 0.0)
: wxCircleShape(width) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyLineShape : public wxLineShape {
DECLARE_DYNAMIC_CLASS(wxPyLineShape);
public:
wxPyLineShape() : wxLineShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyPolygonShape : public wxPolygonShape {
DECLARE_DYNAMIC_CLASS(wxPyPolygonShape);
public:
wxPyPolygonShape() : wxPolygonShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyTextShape : public wxTextShape {
DECLARE_DYNAMIC_CLASS(wxPyTextShape);
public:
wxPyTextShape(double width = 0.0, double height = 0.0)
: wxTextShape(width, height) {}
WXSHAPE_DEC_CALLBACKS();
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,583 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: oglshapes.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 3-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module oglshapes
%{
#include "wxPython.h"
#include "oglhelpers.h"
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%import windows.i
%extern _defs.i
%extern misc.i
%extern gdi.i
%include _ogldefs.i
%import oglbasic.i
%pragma(python) code = "import wx"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxPseudoMetaFile : public wxObject {
public:
wxPseudoMetaFile();
~wxPseudoMetaFile();
void Draw(wxDC& dc, double xoffset, double yoffset);
#ifdef wxUSE_PROLOGIO
void WriteAttributes(wxExpr *clause, int whichAngle);
void ReadAttributes(wxExpr *clause, int whichAngle);
#endif
void Clear();
void Copy(wxPseudoMetaFile& copy);
void Scale(double sx, double sy);
void ScaleTo(double w, double h);
void Translate(double x, double y);
void Rotate(double x, double y, double theta);
bool LoadFromMetaFile(const wxString& filename, double *width, double *height);
void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
void CalculateSize(wxPyDrawnShape* shape);
// **** fix these... is it even possible? these are lists of various GDI opperations (not the objects...)
// wxList& GetOutlineColours();
// wxList& GetFillColours();
// wxList& GetOps();
void SetRotateable(bool rot);
bool GetRotateable();
void SetSize(double w, double h);
void SetFillBrush(wxBrush* brush);
wxBrush* GetFillBrush();
void SetOutlinePen(wxPen* pen);
wxPen* GetOutlinePen();
void SetOutlineOp(int op);
int GetOutlineOp();
bool IsValid();
void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
void DrawRectangle(const wxRect& rect);
void DrawRoundedRectangle(const wxRect& rect, double radius);
void DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt);
void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
void DrawEllipse(const wxRect& rect);
void DrawPoint(const wxPoint& pt);
void DrawText(const wxString& text, const wxPoint& pt);
void DrawLines(int PCOUNT, wxPoint* points);
void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
void DrawSpline(int PCOUNT, wxPoint* points);
void SetClippingRect(const wxRect& rect);
void DestroyClippingRect();
void SetPen(wxPen* pen, bool isOutline = FALSE);
void SetBrush(wxBrush* brush, bool isFill = FALSE);
void SetFont(wxFont* font);
void SetTextColour(const wxColour& colour);
void SetBackgroundColour(const wxColour& colour);
void SetBackgroundMode(int mode);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape);
%}
class wxPyRectangleShape : public wxPyShape {
public:
wxPyRectangleShape(double width = 0.0, double height = 0.0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyRectangleShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void SetCornerRadius(double radius);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyControlPoint, wxControlPoint);
%}
class wxPyControlPoint : public wxPyRectangleShape {
public:
wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
wxPyShape *object = NULL,
double size = 0.0, double the_xoffset = 0.0,
double the_yoffset = 0.0, int the_type = 0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyControlPoint)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void SetCornerRadius(double radius);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyBitmapShape, wxBitmapShape);
%}
class wxPyBitmapShape : public wxPyRectangleShape {
public:
wxPyBitmapShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyBitmapShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
wxBitmap& GetBitmap();
wxString GetFilename();
void SetBitmap(const wxBitmap& bitmap);
void SetFilename(const wxString& filename);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyDrawnShape, wxDrawnShape);
%}
class wxPyDrawnShape : public wxPyRectangleShape {
public:
wxPyDrawnShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDrawnShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void CalculateSize();
void DestroyClippingRect();
void DrawArc(const wxPoint& centrePoint, const wxPoint& startPoint,
const wxPoint& endPoint);
void DrawAtAngle(int angle);
void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
void DrawLine(const wxPoint& point1, const wxPoint& point2);
void DrawLines(int PCOUNT, wxPoint* points);
void DrawPoint(const wxPoint& point);
void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
void DrawRectangle(const wxRect& rect);
void DrawRoundedRectangle(const wxRect& rect, double radius);
void DrawSpline(int PCOUNT, wxPoint* points);
void DrawText(const wxString& text, const wxPoint& point);
int GetAngle();
wxPseudoMetaFile& GetMetaFile();
double GetRotation();
bool LoadFromMetaFile(const wxString& filename);
void Rotate(double x, double y, double theta);
void SetClippingRect(const wxRect& rect);
void SetDrawnBackgroundColour(const wxColour& colour);
void SetDrawnBackgroundMode(int mode);
void SetDrawnBrush(wxBrush* pen, bool isOutline = FALSE);
void SetDrawnFont(wxFont* font);
void SetDrawnPen(wxPen* pen, bool isOutline = FALSE);
void SetDrawnTextColour(const wxColour& colour);
void Scale(double sx, double sy);
void SetSaveToFile(bool save);
void Translate(double x, double y);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
class wxOGLConstraint : public wxObject {
public:
//wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained);
%addmethods {
wxOGLConstraint(int type, wxPyShape *constraining, PyObject* constrained) {
wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
delete list;
return rv;
}
}
//~wxOGLConstraint(); The wxCompositShape takes ownership of the constraint
bool Evaluate();
void SetSpacing(double x, double y);
bool Equals(double a, double b);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyCompositeShape, wxCompositeShape);
%}
class wxPyCompositeShape : public wxPyRectangleShape {
public:
wxPyCompositeShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyCompositeShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint);
//wxOGLConstraint * AddConstraint(int type,
// wxPyShape *constraining,
// wxList& constrained);
%addmethods {
wxOGLConstraint * AddConstrainedShapes(int type, wxPyShape *constraining,
PyObject* constrained) {
wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
delete list;
return rv;
}
}
%name(AddSimpleConstraint)wxOGLConstraint* AddConstraint(int type,
wxPyShape *constraining,
wxPyShape *constrained);
void CalculateSize();
bool ContainsDivision(wxPyDivisionShape *division);
void DeleteConstraint(wxOGLConstraint *constraint);
void DeleteConstraintsInvolvingChild(wxPyShape *child);
// **** Needs an output typemap
//wxOGLConstraint * FindConstraint(long id, wxPyCompositeShape **actualComposite);
wxPyShape * FindContainerImage();
// wxList& GetConstraints();
// wxList& GetDivisions();
%addmethods {
PyObject* GetConstraints() {
wxList& list = self->GetConstraints();
return wxPy_ConvertList(&list, "wxOGLConstraint");
}
PyObject* GetDivisions() {
wxList& list = self->GetDivisions();
return wxPy_ConvertShapeList(&list, "wxPyDivisionShape");
}
}
void MakeContainer();
bool Recompute();
void RemoveChild(wxPyShape *child);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyDividedShape, wxDividedShape);
%}
class wxPyDividedShape : public wxPyRectangleShape {
public:
wxPyDividedShape(double width = 0.0, double height = 0.0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDividedShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void EditRegions();
void SetRegionSizes();
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyDivisionShape, wxDivisionShape);
%}
class wxPyDivisionShape : public wxPyCompositeShape {
public:
wxPyDivisionShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDivisionShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void AdjustBottom(double bottom, bool test);
void AdjustLeft(double left, bool test);
void AdjustRight(double right, bool test);
void AdjustTop(double top, bool test);
void Divide(int direction);
void EditEdge(int side);
wxPyDivisionShape * GetBottomSide();
int GetHandleSide();
wxPyDivisionShape * GetLeftSide();
wxString GetLeftSideColour();
wxPen * GetLeftSidePen();
wxPyDivisionShape * GetRightSide();
wxPyDivisionShape * GetTopSide();
wxPen * GetTopSidePen();
void ResizeAdjoining(int side, double newPos, bool test);
void PopupMenu(double x, double y);
void SetBottomSide(wxPyDivisionShape *shape);
void SetHandleSide(int side);
void SetLeftSide(wxPyDivisionShape *shape);
void SetLeftSideColour(const wxString& colour);
void SetLeftSidePen(wxPen *pen);
void SetRightSide(wxPyDivisionShape *shape);
void SetTopSide(wxPyDivisionShape *shape);
void SetTopSideColour(const wxString& colour);
void SetTopSidePen(wxPen *pen);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,389 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: oglshapes2.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 3-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module oglshapes2
%{
#include "wxPython.h"
#include "oglhelpers.h"
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%import windows.i
%extern _defs.i
%extern misc.i
%extern gdi.i
%include _ogldefs.i
%import oglbasic.i
%import oglshapes.i
%pragma(python) code = "import wx"
//---------------------------------------------------------------------------
%{
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyEmptyString(wxT(""));
%}
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyEllipseShape, wxEllipseShape);
%}
class wxPyEllipseShape : public wxPyShape {
public:
wxPyEllipseShape(double width = 0.0, double height = 0.0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyEllipseShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyCircleShape, wxCircleShape);
%}
class wxPyCircleShape : public wxPyEllipseShape {
public:
wxPyCircleShape(double width = 0.0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyCircleShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxArrowHead : public wxObject {
public:
wxArrowHead(int type = 0,
int end = 0,
double size = 0.0,
double dist = 0.0,
const wxString& name = wxPyEmptyString,
wxPseudoMetaFile *mf = NULL,
long arrowId = -1);
~wxArrowHead();
int _GetType();
int GetPosition();
void SetPosition(int pos);
double GetXOffset();
double GetYOffset();
double GetSpacing();
double GetSize();
wxString GetName();
void SetXOffset(double x);
void SetYOffset(double y);
wxPseudoMetaFile *GetMetaFile();
long GetId();
int GetArrowEnd();
double GetArrowSize();
void SetSize(double size);
void SetSpacing(double sp);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyLineShape, wxLineShape);
%}
class wxPyLineShape : public wxPyShape {
public:
wxPyLineShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyLineShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void AddArrow(int type, int end = ARROW_POSITION_END,
double arrowSize = 10.0, double xOffset = 0.0,
const wxString& name = wxPyEmptyString, wxPseudoMetaFile *mf = NULL,
long arrowId = -1);
//void AddArrowOrdered(wxArrowHead *arrow, wxList& referenceList, int end);
%addmethods {
void AddArrowOrdered(wxArrowHead *arrow, PyObject* referenceList, int end) {
wxList* list = wxPy_wxListHelper(referenceList, "_wxArrowHead_p");
self->AddArrowOrdered(arrow, *list, end);
delete list;
}
}
bool ClearArrow(const wxString& name);
void ClearArrowsAtPosition(int position = -1);
void DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool proportionalOffset);
%name(DeleteArrowHeadId)bool DeleteArrowHead(long arrowId);
bool DeleteArrowHead(int position, const wxString& name);
bool DeleteLineControlPoint();
void DrawArrows(wxDC& dc);
void DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y);
void EraseRegion(wxDC& dc, wxShapeRegion *region, double x, double y);
%name(FindArrowHeadId)wxArrowHead * FindArrowHead(long arrowId);
wxArrowHead * FindArrowHead(int position, const wxString& name);
void FindLineEndPoints(double *OUTPUT, double *OUTPUT,
double *OUTPUT, double *OUTPUT);
int FindLinePosition(double x, double y);
double FindMinimumWidth();
void FindNth(wxPyShape *image, int *OUTPUT, int *OUTPUT, bool incoming);
int GetAttachmentFrom();
int GetAttachmentTo();
void GetEnds(double *OUTPUT, double *OUTPUT, double *OUTPUT, double *OUTPUT);
wxPyShape * GetFrom();
void GetLabelPosition(int position, double *OUTPUT, double *OUTPUT);
wxRealPoint * GetNextControlPoint(wxPyShape *shape);
wxPyShape * GetTo();
void Initialise();
void InsertLineControlPoint(wxDC* dc);
bool IsEnd(wxPyShape *shape);
bool IsSpline();
void MakeLineControlPoints(int n);
// inline wxList *GetLineControlPoints() { return m_lineControlPoints; }
%addmethods {
PyObject* GetLineControlPoints() {
wxList* list = self->GetLineControlPoints();
return wxPy_ConvertShapeList(list, "wxPyControlPoint");
}
}
void SetAttachmentFrom(int fromAttach);
void SetAttachments(int fromAttach, int toAttach);
void SetAttachmentTo(int toAttach);
void SetEnds(double x1, double y1, double x2, double y2);
void SetFrom(wxPyShape *object);
void SetIgnoreOffsets(bool ignore);
void SetSpline(bool spline);
void SetTo(wxPyShape *object);
void Straighten(wxDC* dc = NULL);
void Unlink();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyPolygonShape, wxPolygonShape);
%}
class wxPyPolygonShape : public wxPyShape {
public:
wxPyPolygonShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyPolygonShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
// void Create(wxList* points);
%addmethods {
PyObject* Create(PyObject* points) {
wxList* list = wxPy_wxRealPoint_ListHelper(points);
if (list) {
self->Create(list);
Py_INCREF(Py_None);
return Py_None;
}
else return NULL;
}
}
void AddPolygonPoint(int pos = 0);
void CalculatePolygonCentre();
void DeletePolygonPoint(int pos = 0);
// wxList* GetPoints();
%addmethods {
PyObject* GetPoints() {
wxList* list = self->GetPoints();
return wxPy_ConvertList(list, "wxRealPoint");
}
}
void UpdateOriginalPoints();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyTextShape, wxTextShape);
%}
class wxPyTextShape : public wxPyRectangleShape {
public:
wxPyTextShape(double width = 0.0, double height = 0.0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyTextShape)"
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------

View File

@@ -1,782 +0,0 @@
# This file was created automatically by SWIG.
import oglshapes2c
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
from oglbasic import *
from oglshapes import *
import wx
class wxPyEllipseShapePtr(wxPyShapePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape__setCallbackInfo,(self,) + _args, _kwargs)
return val
def base_OnDraw(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDraw,(self,) + _args, _kwargs)
return val
def base_OnDrawContents(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDrawContents,(self,) + _args, _kwargs)
return val
def base_OnDrawBranches(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDrawBranches,(self,) + _args, _kwargs)
return val
def base_OnMoveLinks(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnMoveLinks,(self,) + _args, _kwargs)
return val
def base_OnErase(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnErase,(self,) + _args, _kwargs)
return val
def base_OnEraseContents(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnEraseContents,(self,) + _args, _kwargs)
return val
def base_OnHighlight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnHighlight,(self,) + _args, _kwargs)
return val
def base_OnLeftClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnLeftClick,(self,) + _args, _kwargs)
return val
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
return val
def base_OnRightClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnRightClick,(self,) + _args, _kwargs)
return val
def base_OnSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnSize,(self,) + _args, _kwargs)
return val
def base_OnMovePre(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnMovePre,(self,) + _args, _kwargs)
return val
def base_OnMovePost(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnMovePost,(self,) + _args, _kwargs)
return val
def base_OnDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnEndDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDragRight,(self,) + _args, _kwargs)
return val
def base_OnBeginDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
return val
def base_OnEndDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnEndDragRight,(self,) + _args, _kwargs)
return val
def base_OnDrawOutline(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDrawOutline,(self,) + _args, _kwargs)
return val
def base_OnDrawControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
return val
def base_OnEraseControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
return val
def base_OnMoveLink(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnMoveLink,(self,) + _args, _kwargs)
return val
def base_OnSizingDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnBeginSize,(self,) + _args, _kwargs)
return val
def base_OnEndSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyEllipseShape_base_OnEndSize,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxPyEllipseShape instance at %s>" % (self.this,)
class wxPyEllipseShape(wxPyEllipseShapePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(oglshapes2c.new_wxPyEllipseShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyEllipseShape)
self._setOORInfo(self)
class wxPyCircleShapePtr(wxPyEllipseShapePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape__setCallbackInfo,(self,) + _args, _kwargs)
return val
def base_OnDraw(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnDraw,(self,) + _args, _kwargs)
return val
def base_OnDrawContents(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnDrawContents,(self,) + _args, _kwargs)
return val
def base_OnDrawBranches(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnDrawBranches,(self,) + _args, _kwargs)
return val
def base_OnMoveLinks(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnMoveLinks,(self,) + _args, _kwargs)
return val
def base_OnErase(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnErase,(self,) + _args, _kwargs)
return val
def base_OnEraseContents(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnEraseContents,(self,) + _args, _kwargs)
return val
def base_OnHighlight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnHighlight,(self,) + _args, _kwargs)
return val
def base_OnLeftClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnLeftClick,(self,) + _args, _kwargs)
return val
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
return val
def base_OnRightClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnRightClick,(self,) + _args, _kwargs)
return val
def base_OnSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnSize,(self,) + _args, _kwargs)
return val
def base_OnMovePre(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnMovePre,(self,) + _args, _kwargs)
return val
def base_OnMovePost(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnMovePost,(self,) + _args, _kwargs)
return val
def base_OnDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnEndDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnDragRight,(self,) + _args, _kwargs)
return val
def base_OnBeginDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
return val
def base_OnEndDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnEndDragRight,(self,) + _args, _kwargs)
return val
def base_OnDrawOutline(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnDrawOutline,(self,) + _args, _kwargs)
return val
def base_OnDrawControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
return val
def base_OnEraseControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
return val
def base_OnMoveLink(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnMoveLink,(self,) + _args, _kwargs)
return val
def base_OnSizingDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnBeginSize,(self,) + _args, _kwargs)
return val
def base_OnEndSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyCircleShape_base_OnEndSize,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxPyCircleShape instance at %s>" % (self.this,)
class wxPyCircleShape(wxPyCircleShapePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(oglshapes2c.new_wxPyCircleShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyCircleShape)
self._setOORInfo(self)
class wxArrowHeadPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self, delfunc=oglshapes2c.delete_wxArrowHead):
if self.thisown == 1:
try:
delfunc(self)
except:
pass
def _GetType(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead__GetType,(self,) + _args, _kwargs)
return val
def GetPosition(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_GetPosition,(self,) + _args, _kwargs)
return val
def SetPosition(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_SetPosition,(self,) + _args, _kwargs)
return val
def GetXOffset(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_GetXOffset,(self,) + _args, _kwargs)
return val
def GetYOffset(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_GetYOffset,(self,) + _args, _kwargs)
return val
def GetSpacing(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_GetSpacing,(self,) + _args, _kwargs)
return val
def GetSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_GetSize,(self,) + _args, _kwargs)
return val
def GetName(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_GetName,(self,) + _args, _kwargs)
return val
def SetXOffset(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_SetXOffset,(self,) + _args, _kwargs)
return val
def SetYOffset(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_SetYOffset,(self,) + _args, _kwargs)
return val
def GetMetaFile(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_GetMetaFile,(self,) + _args, _kwargs)
return val
def GetId(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_GetId,(self,) + _args, _kwargs)
return val
def GetArrowEnd(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_GetArrowEnd,(self,) + _args, _kwargs)
return val
def GetArrowSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_GetArrowSize,(self,) + _args, _kwargs)
return val
def SetSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_SetSize,(self,) + _args, _kwargs)
return val
def SetSpacing(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxArrowHead_SetSpacing,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxArrowHead instance at %s>" % (self.this,)
class wxArrowHead(wxArrowHeadPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(oglshapes2c.new_wxArrowHead,_args,_kwargs)
self.thisown = 1
class wxPyLineShapePtr(wxPyShapePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape__setCallbackInfo,(self,) + _args, _kwargs)
return val
def AddArrow(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_AddArrow,(self,) + _args, _kwargs)
return val
def AddArrowOrdered(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_AddArrowOrdered,(self,) + _args, _kwargs)
return val
def ClearArrow(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_ClearArrow,(self,) + _args, _kwargs)
return val
def ClearArrowsAtPosition(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_ClearArrowsAtPosition,(self,) + _args, _kwargs)
return val
def DrawArrow(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_DrawArrow,(self,) + _args, _kwargs)
return val
def DeleteArrowHeadId(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_DeleteArrowHeadId,(self,) + _args, _kwargs)
return val
def DeleteArrowHead(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_DeleteArrowHead,(self,) + _args, _kwargs)
return val
def DeleteLineControlPoint(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_DeleteLineControlPoint,(self,) + _args, _kwargs)
return val
def DrawArrows(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_DrawArrows,(self,) + _args, _kwargs)
return val
def DrawRegion(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_DrawRegion,(self,) + _args, _kwargs)
return val
def EraseRegion(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_EraseRegion,(self,) + _args, _kwargs)
return val
def FindArrowHeadId(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_FindArrowHeadId,(self,) + _args, _kwargs)
return val
def FindArrowHead(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_FindArrowHead,(self,) + _args, _kwargs)
return val
def FindLineEndPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_FindLineEndPoints,(self,) + _args, _kwargs)
return val
def FindLinePosition(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_FindLinePosition,(self,) + _args, _kwargs)
return val
def FindMinimumWidth(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_FindMinimumWidth,(self,) + _args, _kwargs)
return val
def FindNth(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_FindNth,(self,) + _args, _kwargs)
return val
def GetAttachmentFrom(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_GetAttachmentFrom,(self,) + _args, _kwargs)
return val
def GetAttachmentTo(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_GetAttachmentTo,(self,) + _args, _kwargs)
return val
def GetEnds(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_GetEnds,(self,) + _args, _kwargs)
return val
def GetFrom(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_GetFrom,(self,) + _args, _kwargs)
return val
def GetLabelPosition(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_GetLabelPosition,(self,) + _args, _kwargs)
return val
def GetNextControlPoint(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_GetNextControlPoint,(self,) + _args, _kwargs)
if val: val = wxRealPointPtr(val)
return val
def GetTo(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_GetTo,(self,) + _args, _kwargs)
return val
def Initialise(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_Initialise,(self,) + _args, _kwargs)
return val
def InsertLineControlPoint(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_InsertLineControlPoint,(self,) + _args, _kwargs)
return val
def IsEnd(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_IsEnd,(self,) + _args, _kwargs)
return val
def IsSpline(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_IsSpline,(self,) + _args, _kwargs)
return val
def MakeLineControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_MakeLineControlPoints,(self,) + _args, _kwargs)
return val
def GetLineControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_GetLineControlPoints,(self,) + _args, _kwargs)
return val
def SetAttachmentFrom(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_SetAttachmentFrom,(self,) + _args, _kwargs)
return val
def SetAttachments(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_SetAttachments,(self,) + _args, _kwargs)
return val
def SetAttachmentTo(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_SetAttachmentTo,(self,) + _args, _kwargs)
return val
def SetEnds(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_SetEnds,(self,) + _args, _kwargs)
return val
def SetFrom(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_SetFrom,(self,) + _args, _kwargs)
return val
def SetIgnoreOffsets(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_SetIgnoreOffsets,(self,) + _args, _kwargs)
return val
def SetSpline(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_SetSpline,(self,) + _args, _kwargs)
return val
def SetTo(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_SetTo,(self,) + _args, _kwargs)
return val
def Straighten(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_Straighten,(self,) + _args, _kwargs)
return val
def Unlink(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_Unlink,(self,) + _args, _kwargs)
return val
def base_OnDraw(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnDraw,(self,) + _args, _kwargs)
return val
def base_OnDrawContents(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnDrawContents,(self,) + _args, _kwargs)
return val
def base_OnDrawBranches(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnDrawBranches,(self,) + _args, _kwargs)
return val
def base_OnMoveLinks(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnMoveLinks,(self,) + _args, _kwargs)
return val
def base_OnErase(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnErase,(self,) + _args, _kwargs)
return val
def base_OnEraseContents(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnEraseContents,(self,) + _args, _kwargs)
return val
def base_OnHighlight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnHighlight,(self,) + _args, _kwargs)
return val
def base_OnLeftClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnLeftClick,(self,) + _args, _kwargs)
return val
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
return val
def base_OnRightClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnRightClick,(self,) + _args, _kwargs)
return val
def base_OnSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnSize,(self,) + _args, _kwargs)
return val
def base_OnMovePre(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnMovePre,(self,) + _args, _kwargs)
return val
def base_OnMovePost(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnMovePost,(self,) + _args, _kwargs)
return val
def base_OnDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnEndDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnDragRight,(self,) + _args, _kwargs)
return val
def base_OnBeginDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
return val
def base_OnEndDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnEndDragRight,(self,) + _args, _kwargs)
return val
def base_OnDrawOutline(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnDrawOutline,(self,) + _args, _kwargs)
return val
def base_OnDrawControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
return val
def base_OnEraseControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
return val
def base_OnMoveLink(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnMoveLink,(self,) + _args, _kwargs)
return val
def base_OnSizingDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnBeginSize,(self,) + _args, _kwargs)
return val
def base_OnEndSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyLineShape_base_OnEndSize,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxPyLineShape instance at %s>" % (self.this,)
class wxPyLineShape(wxPyLineShapePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(oglshapes2c.new_wxPyLineShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyLineShape)
self._setOORInfo(self)
class wxPyPolygonShapePtr(wxPyShapePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape__setCallbackInfo,(self,) + _args, _kwargs)
return val
def Create(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_Create,(self,) + _args, _kwargs)
return val
def AddPolygonPoint(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_AddPolygonPoint,(self,) + _args, _kwargs)
return val
def CalculatePolygonCentre(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_CalculatePolygonCentre,(self,) + _args, _kwargs)
return val
def DeletePolygonPoint(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_DeletePolygonPoint,(self,) + _args, _kwargs)
return val
def GetPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_GetPoints,(self,) + _args, _kwargs)
return val
def UpdateOriginalPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_UpdateOriginalPoints,(self,) + _args, _kwargs)
return val
def base_OnDraw(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDraw,(self,) + _args, _kwargs)
return val
def base_OnDrawContents(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDrawContents,(self,) + _args, _kwargs)
return val
def base_OnDrawBranches(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDrawBranches,(self,) + _args, _kwargs)
return val
def base_OnMoveLinks(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnMoveLinks,(self,) + _args, _kwargs)
return val
def base_OnErase(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnErase,(self,) + _args, _kwargs)
return val
def base_OnEraseContents(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnEraseContents,(self,) + _args, _kwargs)
return val
def base_OnHighlight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnHighlight,(self,) + _args, _kwargs)
return val
def base_OnLeftClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnLeftClick,(self,) + _args, _kwargs)
return val
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
return val
def base_OnRightClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnRightClick,(self,) + _args, _kwargs)
return val
def base_OnSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnSize,(self,) + _args, _kwargs)
return val
def base_OnMovePre(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnMovePre,(self,) + _args, _kwargs)
return val
def base_OnMovePost(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnMovePost,(self,) + _args, _kwargs)
return val
def base_OnDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnEndDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDragRight,(self,) + _args, _kwargs)
return val
def base_OnBeginDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
return val
def base_OnEndDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnEndDragRight,(self,) + _args, _kwargs)
return val
def base_OnDrawOutline(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDrawOutline,(self,) + _args, _kwargs)
return val
def base_OnDrawControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
return val
def base_OnEraseControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
return val
def base_OnMoveLink(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnMoveLink,(self,) + _args, _kwargs)
return val
def base_OnSizingDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnBeginSize,(self,) + _args, _kwargs)
return val
def base_OnEndSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyPolygonShape_base_OnEndSize,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxPyPolygonShape instance at %s>" % (self.this,)
class wxPyPolygonShape(wxPyPolygonShapePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(oglshapes2c.new_wxPyPolygonShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyPolygonShape)
self._setOORInfo(self)
class wxPyTextShapePtr(wxPyRectangleShapePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape__setCallbackInfo,(self,) + _args, _kwargs)
return val
def base_OnDelete(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnDelete,(self,) + _args, _kwargs)
return val
def base_OnDraw(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnDraw,(self,) + _args, _kwargs)
return val
def base_OnDrawContents(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnDrawContents,(self,) + _args, _kwargs)
return val
def base_OnDrawBranches(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnDrawBranches,(self,) + _args, _kwargs)
return val
def base_OnMoveLinks(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnMoveLinks,(self,) + _args, _kwargs)
return val
def base_OnErase(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnErase,(self,) + _args, _kwargs)
return val
def base_OnEraseContents(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnEraseContents,(self,) + _args, _kwargs)
return val
def base_OnHighlight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnHighlight,(self,) + _args, _kwargs)
return val
def base_OnLeftClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnLeftClick,(self,) + _args, _kwargs)
return val
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
return val
def base_OnRightClick(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnRightClick,(self,) + _args, _kwargs)
return val
def base_OnSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnSize,(self,) + _args, _kwargs)
return val
def base_OnMovePre(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnMovePre,(self,) + _args, _kwargs)
return val
def base_OnMovePost(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnMovePost,(self,) + _args, _kwargs)
return val
def base_OnDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnEndDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnDragRight,(self,) + _args, _kwargs)
return val
def base_OnBeginDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
return val
def base_OnEndDragRight(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnEndDragRight,(self,) + _args, _kwargs)
return val
def base_OnDrawOutline(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnDrawOutline,(self,) + _args, _kwargs)
return val
def base_OnDrawControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
return val
def base_OnEraseControlPoints(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
return val
def base_OnMoveLink(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnMoveLink,(self,) + _args, _kwargs)
return val
def base_OnSizingDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
return val
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
return val
def base_OnBeginSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnBeginSize,(self,) + _args, _kwargs)
return val
def base_OnEndSize(self, *_args, **_kwargs):
val = apply(oglshapes2c.wxPyTextShape_base_OnEndSize,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxPyTextShape instance at %s>" % (self.this,)
class wxPyTextShape(wxPyTextShapePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(oglshapes2c.new_wxPyTextShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyTextShape)
self._setOORInfo(self)
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------

View File

@@ -1,6 +0,0 @@
Makefile
Makefile
contrib
stc_c.exp
stc_c.ilk
stc_c.pch

View File

@@ -1,7 +0,0 @@
Since STC is not always bundled with distributions of wxWindows, in
order for it to be a standard part of wxPython I need to bundle it
here. The contents of the contrib directory are copies of the
relevant parts of the main contrib directory in wxWindows. The
build.py script in this directory will also build the needed files
from there, so you no longer have to worry about aquiring and building
additional libraries beyond wxWindows itself.

View File

@@ -1,7 +0,0 @@
# Stuff these names into the wx namespace so wxPyConstructObject can find them
wx.wxStyledTextEventPtr = wxStyledTextEventPtr
wx.wxStyledTextCtrlPtr = wxStyledTextCtrlPtr
# This constant no longer exists in Scintilla, but I'll put it here for a while to avoid disrupting user code...
wxSTC_CARET_CENTER = 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
# The name "stc.cpp" was causing the debugger to get confused with the
# same module name in the stc library, so I changed the name of this
# one to stc_.cpp and this little stub to make the "stc" Python module
# name still usesable for everything that matters.
from stc_ import *

View File

@@ -1,136 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: stc.i
// Purpose: Wrappers for the wxStyledTextCtrl.
//
// Author: Robin Dunn
//
// Created: 12-Oct-1999
// RCS-ID: $Id$
// Copyright: (c) 2000 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module stc_
%{
#include "wxPython.h"
#include "wx/stc/stc.h"
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%extern windows.i
%extern _defs.i
%extern events.i
%extern controls.i
//----------------------------------------------------------------------
%{
// Put some wx default wxChar* values into wxStrings.
DECLARE_DEF_STRING(STCNameStr);
%}
//----------------------------------------------------------------------
// Get all our defs from the REAL header file.
%include stc.h
//----------------------------------------------------------------------
// Python functions to act like the event macros
%pragma(python) code = "
def EVT_STC_CHANGE(win, id, func):
win.Connect(id, -1, wxEVT_STC_CHANGE, func)
def EVT_STC_STYLENEEDED(win, id, func):
win.Connect(id, -1, wxEVT_STC_STYLENEEDED, func)
def EVT_STC_CHARADDED(win, id, func):
win.Connect(id, -1, wxEVT_STC_CHARADDED, func)
def EVT_STC_SAVEPOINTREACHED(win, id, func):
win.Connect(id, -1, wxEVT_STC_SAVEPOINTREACHED, func)
def EVT_STC_SAVEPOINTLEFT(win, id, func):
win.Connect(id, -1, wxEVT_STC_SAVEPOINTLEFT, func)
def EVT_STC_ROMODIFYATTEMPT(win, id, func):
win.Connect(id, -1, wxEVT_STC_ROMODIFYATTEMPT, func)
def EVT_STC_KEY(win, id, func):
win.Connect(id, -1, wxEVT_STC_KEY, func)
def EVT_STC_DOUBLECLICK(win, id, func):
win.Connect(id, -1, wxEVT_STC_DOUBLECLICK, func)
def EVT_STC_UPDATEUI(win, id, func):
win.Connect(id, -1, wxEVT_STC_UPDATEUI, func)
def EVT_STC_MODIFIED(win, id, func):
win.Connect(id, -1, wxEVT_STC_MODIFIED, func)
def EVT_STC_MACRORECORD(win, id, func):
win.Connect(id, -1, wxEVT_STC_MACRORECORD, func)
def EVT_STC_MARGINCLICK(win, id, func):
win.Connect(id, -1, wxEVT_STC_MARGINCLICK, func)
def EVT_STC_NEEDSHOWN(win, id, func):
win.Connect(id, -1, wxEVT_STC_NEEDSHOWN, func)
def EVT_STC_POSCHANGED(win, id, func):
win.Connect(id, -1, wxEVT_STC_POSCHANGED, func)
def EVT_STC_PAINTED(win, id, func):
win.Connect(id, -1, wxEVT_STC_PAINTED, func)
def EVT_STC_USERLISTSELECTION(win, id, func):
win.Connect(id, -1, wxEVT_STC_USERLISTSELECTION, func)
def EVT_STC_URIDROPPED(win, id, func):
win.Connect(id, -1, wxEVT_STC_URIDROPPED, func)
def EVT_STC_DWELLSTART(win, id, func):
win.Connect(id, -1, wxEVT_STC_DWELLSTART, func)
def EVT_STC_DWELLEND(win, id, func):
win.Connect(id, -1, wxEVT_STC_DWELLEND, func)
def EVT_STC_START_DRAG(win, id, func):
win.Connect(id, -1, wxEVT_STC_START_DRAG, func)
def EVT_STC_DRAG_OVER(win, id, func):
win.Connect(id, -1, wxEVT_STC_DRAG_OVER, func)
def EVT_STC_DO_DROP(win, id, func):
win.Connect(id, -1, wxEVT_STC_DO_DROP, func)
def EVT_STC_ZOOM(win, id, func):
win.Connect(id, -1, wxEVT_STC_ZOOM, func)
"
//----------------------------------------------------------------------
%init %{
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
%}
//----------------------------------------------------------------------
%pragma(python) include="_stcextras.py";
//----------------------------------------------------------------------
//----------------------------------------------------------------------

View File

@@ -1 +0,0 @@
contrib

View File

@@ -1,38 +0,0 @@
# The global was removed in favor of static accessor functions. This is for
# backwards compatibility:
wxTheXmlResource = wxXmlResource_Get()
wx.wxXmlNodePtr = wxXmlNodePtr
#----------------------------------------------------------------------
# Create a factory for handling the subclass property of the object tag.
def _my_import(name):
mod = __import__(name)
components = name.split('.')
for comp in components[1:]:
mod = getattr(mod, comp)
return mod
class wxXmlSubclassFactory_Python(wxXmlSubclassFactory):
def __init__(self):
wxXmlSubclassFactory.__init__(self)
def Create(self, className):
assert className.find('.') != -1, "Module name must be specified!"
mname = className[:className.rfind('.')]
cname = className[className.rfind('.')+1:]
module = _my_import(mname)
klass = getattr(module, cname)
inst = klass()
return inst
wxXmlResource_AddSubclassFactory(wxXmlSubclassFactory_Python())

View File

@@ -1,5 +0,0 @@
@echo off
cd %WXWIN%\wxPython
call b.bat %$
cd -

File diff suppressed because it is too large Load Diff

View File

@@ -1,694 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: xrc.i
// Purpose: Wrappers for the XML based Resource system
//
// Author: Robin Dunn
//
// Created: 4-June-2001
// RCS-ID: $Id$
// Copyright: (c) 2001 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module xrc
%{
#include "wxPython.h"
#include "pyistream.h"
#include "wx/xrc/xml.h"
#include "wx/xrc/xmlres.h"
#include <wx/filesys.h>
#include <wx/fs_mem.h>
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%extern windows.i
%extern _defs.i
%extern events.i
%extern controls.i
%extern streams.i
//---------------------------------------------------------------------------
%{
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyEmptyString(wxT(""));
static const wxString wxPyUTF8String(wxT("UTF-8"));
static const wxString wxPyStyleString(wxT("style"));
static const wxString wxPySizeString(wxT("size"));
static const wxString wxPyPosString(wxT("pos"));
static const wxString wxPyBitmapString(wxT("bitmap"));
static const wxString wxPyIconString(wxT("icon"));
static const wxString wxPyFontString(wxT("font"));
%}
class wxPyXmlSubclassFactory;
//---------------------------------------------------------------------------
enum wxXmlResourceFlags
{
wxXRC_USE_LOCALE = 1,
wxXRC_NO_SUBCLASSING = 2
};
// This class holds XML resources from one or more .xml files
// (or derived forms, either binary or zipped -- see manual for
// details).
class wxXmlResource : public wxObject
{
public:
// Ctors.
// Flags: wxXRC_USE_LOCALE
// translatable strings will be translated via _()
// wxXRC_NO_SUBCLASSING
// subclass property of object nodes will be ignored
// (useful for previews in XRC editors)
wxXmlResource(const wxString& filemask, int flags = wxXRC_USE_LOCALE);
%name(wxEmptyXmlResource) wxXmlResource(int flags = wxXRC_USE_LOCALE);
%pragma(python) addtomethod = "__init__:self.InitAllHandlers()"
%pragma(python) addtomethod = "wxEmptyXmlResource:val.InitAllHandlers()"
~wxXmlResource();
// Loads resources from XML files that match given filemask.
// This method understands VFS (see filesys.h).
bool Load(const wxString& filemask);
%addmethods {
bool LoadFromString(const wxString& data) {
static int s_memFileIdx = 0;
// Check for memory FS. If not present, load the handler:
wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"),
wxT("dummy data"));
wxFileSystem fsys;
wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
if (f)
delete f;
else
wxFileSystem::AddHandler(new wxMemoryFSHandler);
// Now put the resource data into the memory FS
wxString filename(wxT("XRC_resource/data_string_"));
filename << s_memFileIdx;
s_memFileIdx += 1;
wxMemoryFSHandler::AddFile(filename, data);
// Load the "file" into the resource object
bool retval = self->Load(wxT("memory:") + filename );
return retval;
}
}
// Initialize handlers for all supported controls/windows. This will
// make the executable quite big because it forces linking against
// most of wxWin library
void InitAllHandlers();
// Initialize only specific handler (or custom handler). Convention says
// that handler name is equal to control's name plus 'XmlHandler', e.g.
// wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. XML resource compiler
// (xmlres) can create include file that contains initialization code for
// all controls used within the resource.
void AddHandler(wxPyXmlResourceHandler *handler);
// Add a new handler at the begining of the handler list
void InsertHandler(wxPyXmlResourceHandler *handler);
// Removes all handlers
void ClearHandlers();
// Registers subclasses factory for use in XRC. This function is not meant
// for public use, please see the comment above wxXmlSubclassFactory
// definition.
static void AddSubclassFactory(wxPyXmlSubclassFactory *factory);
// Loads menu from resource. Returns NULL on failure.
wxMenu *LoadMenu(const wxString& name);
// Loads menubar from resource. Returns NULL on failure.
wxMenuBar *LoadMenuBar(const wxString& name);
%name(LoadMenuBarOnFrame) wxMenuBar *LoadMenuBar(wxWindow *parent, const wxString& name);
// Loads toolbar
wxToolBar *LoadToolBar(wxWindow *parent, const wxString& name);
// Loads dialog. dlg points to parent window (if any). Second form
// is used to finish creation of already existing instance (main reason
// for this is that you may want to use derived class with new event table)
// Example (typical usage):
// MyDialog dlg;
// wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog");
// dlg->ShowModal();
wxDialog *LoadDialog(wxWindow *parent, const wxString& name);
%name(LoadOnDialog)bool LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name);
// Loads panel. panel points to parent window (if any). Second form
// is used to finish creation of already existing instance.
wxPanel *LoadPanel(wxWindow *parent, const wxString& name);
%name(LoadOnPanel)bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name);
// Load a frame's contents from a resource
wxFrame *LoadFrame(wxWindow* parent, const wxString& name);
%name(LoadOnFrame)bool LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name);
// Load an object from the resource specifying both the resource name and
// the classname. This lets you load nonstandard container windows.
wxObject *LoadObject(wxWindow *parent, const wxString& name,
const wxString& classname);
// Load an object from the resource specifying both the resource name and
// the classname. This form lets you finish the creation of an existing
// instance.
%name(LoadOnObject)bool LoadObject(wxObject *instance, wxWindow *parent, const wxString& name,
const wxString& classname);
// Loads bitmap or icon resource from file:
wxBitmap LoadBitmap(const wxString& name);
wxIcon LoadIcon(const wxString& name);
// Attaches unknown control into given panel/window/dialog:
// (unknown controls are used in conjunction with <object class="unknown">)
bool AttachUnknownControl(const wxString& name, wxWindow *control,
wxWindow *parent = NULL);
// Returns numeric ID that is equivalent to string id used in XML
// resource. To be used in event tables
// Macro XMLID is provided for convenience
static int GetXRCID(const wxString& str_id);
// Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a)
long GetVersion() const;
// Compares resources version to argument. Returns -1 if resources version
// is less than the argument, +1 if greater and 0 if they equal.
int CompareVersion(int major, int minor, int release, int revision) const;
// Gets global resources object or create one if none exists
static wxXmlResource *Get();
// Sets global resources object and returns pointer to previous one (may be NULL).
static wxXmlResource *Set(wxXmlResource *res);
// Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING.
int GetFlags();
// Set flags after construction.
void SetFlags(int flags) { m_flags = flags; }
};
//----------------------------------------------------------------------
%pragma(python) code = "
def XRCID(str_id):
return wxXmlResource_GetXRCID(str_id)
def XRCCTRL(window, str_id, *ignoreargs):
return window.FindWindowById(XRCID(str_id))
XMLID = XRCID
XMLCTRL = XRCCTRL
"
//----------------------------------------------------------------------
// wxXmlSubclassFactory
%{
class wxPyXmlSubclassFactory : public wxXmlSubclassFactory
{
public:
wxPyXmlSubclassFactory() {}
DEC_PYCALLBACK_OBJECT_STRING_pure(Create);
PYPRIVATE;
};
IMP_PYCALLBACK_OBJECT_STRING_pure(wxPyXmlSubclassFactory, wxXmlSubclassFactory, Create);
%}
%name(wxXmlSubclassFactory)class wxPyXmlSubclassFactory {
public:
wxPyXmlSubclassFactory();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxXmlSubclassFactory)"
};
//----------------------------------------------------------------------
// In order to provide wrappers for wxXmlResourceHandler we need to also
// provide the classes for representing and parsing XML.
// Represents XML node type.
enum wxXmlNodeType
{
// note: values are synchronized with xmlElementType from libxml
wxXML_ELEMENT_NODE,
wxXML_ATTRIBUTE_NODE,
wxXML_TEXT_NODE,
wxXML_CDATA_SECTION_NODE,
wxXML_ENTITY_REF_NODE,
wxXML_ENTITY_NODE,
wxXML_PI_NODE,
wxXML_COMMENT_NODE,
wxXML_DOCUMENT_NODE,
wxXML_DOCUMENT_TYPE_NODE,
wxXML_DOCUMENT_FRAG_NODE,
wxXML_NOTATION_NODE,
wxXML_HTML_DOCUMENT_NODE
};
// Represents node property(ies).
// Example: in <img src="hello.gif" id="3"/> "src" is property with value
// "hello.gif" and "id" is property with value "3".
class wxXmlProperty
{
public:
wxXmlProperty(const wxString& name = wxPyEmptyString,
const wxString& value = wxPyEmptyString,
wxXmlProperty *next = NULL);
wxString GetName() const;
wxString GetValue() const;
wxXmlProperty *GetNext() const;
void SetName(const wxString& name);
void SetValue(const wxString& value);
void SetNext(wxXmlProperty *next);
};
// Represents node in XML document. Node has name and may have content
// and properties. Most common node types are wxXML_TEXT_NODE (name and props
// are irrelevant) and wxXML_ELEMENT_NODE (e.g. in <title>hi</title> there is
// element with name="title", irrelevant content and one child (wxXML_TEXT_NODE
// with content="hi").
//
// If wxUSE_UNICODE is 0, all strings are encoded in the encoding given to Load
// (default is UTF-8).
class wxXmlNode
{
public:
wxXmlNode(wxXmlNode *parent = NULL,
wxXmlNodeType type = 0,
const wxString& name = wxPyEmptyString,
const wxString& content = wxPyEmptyString,
wxXmlProperty *props = NULL,
wxXmlNode *next = NULL);
~wxXmlNode();
// user-friendly creation:
%name(wxXmlNodeEasy)wxXmlNode(wxXmlNodeType type, const wxString& name,
const wxString& content = wxPyEmptyString);
void AddChild(wxXmlNode *child);
void InsertChild(wxXmlNode *child, wxXmlNode *before_node);
bool RemoveChild(wxXmlNode *child);
void AddProperty(wxXmlProperty *prop);
%name(AddPropertyName)void AddProperty(const wxString& name, const wxString& value);
bool DeleteProperty(const wxString& name);
// access methods:
wxXmlNodeType GetType() const;
wxString GetName() const;
wxString GetContent() const;
wxXmlNode *GetParent() const;
wxXmlNode *GetNext() const;
wxXmlNode *GetChildren() const;
wxXmlProperty *GetProperties() const;
wxString GetPropVal(const wxString& propName,
const wxString& defaultVal) const;
bool HasProp(const wxString& propName) const;
void SetType(wxXmlNodeType type);
void SetName(const wxString& name);
void SetContent(const wxString& con);
void SetParent(wxXmlNode *parent);
void SetNext(wxXmlNode *next);
void SetChildren(wxXmlNode *child);
void SetProperties(wxXmlProperty *prop);
};
// This class holds XML data/document as parsed by XML parser.
class wxXmlDocument : public wxObject
{
public:
wxXmlDocument(const wxString& filename,
const wxString& encoding = wxPyUTF8String);
%name(wxXmlDocumentFromStream)wxXmlDocument(wxInputStream& stream,
const wxString& encoding = wxPyUTF8String);
%name(wxEmptyXmlDocument)wxXmlDocument();
~wxXmlDocument();
// Parses .xml file and loads data. Returns TRUE on success, FALSE
// otherwise.
bool Load(const wxString& filename,
const wxString& encoding = wxPyUTF8String);
%name(LoadFromStream)bool Load(wxInputStream& stream,
const wxString& encoding = wxPyUTF8String);
// Saves document as .xml file.
bool Save(const wxString& filename) const;
%name(SaveToStream)bool Save(wxOutputStream& stream) const;
bool IsOk() const;
// Returns root node of the document.
wxXmlNode *GetRoot() const;
// Returns version of document (may be empty).
wxString GetVersion() const;
// Returns encoding of document (may be empty).
// Note: this is the encoding original file was saved in, *not* the
// encoding of in-memory representation!
wxString GetFileEncoding() const;
// Write-access methods:
void SetRoot(wxXmlNode *node);
void SetVersion(const wxString& version);
void SetFileEncoding(const wxString& encoding);
%addmethods {
// Returns encoding of in-memory representation of the document (same
// as passed to Load or ctor, defaults to UTF-8). NB: this is
// meaningless in Unicode build where data are stored as wchar_t*
wxString GetEncoding() {
#if wxUSE_UNICODE
return wxPyEmptyString;
#else
return self->GetEncoding();
#endif
}
void SetEncoding(const wxString& enc) {
#if wxUSE_UNICODE
// do nothing
#else
self->SetEncoding(enc);
#endif
}
}
};
//----------------------------------------------------------------------
// And now for wxXmlResourceHandler...
%{ // C++ version of Python aware wxXmlResourceHandler, for the pure virtual
// callbacks, as well as to make some protected things public so they can
// be wrapped.
class wxPyXmlResourceHandler : public wxXmlResourceHandler {
public:
wxPyXmlResourceHandler() : wxXmlResourceHandler() {}
//~wxPyXmlResourceHandler();
// Base class virtuals
DEC_PYCALLBACK_OBJECT__pure(DoCreateResource);
DEC_PYCALLBACK_BOOL_NODE_pure(CanHandle);
// accessors for protected members
wxXmlResource* GetResource() { return m_resource; }
wxXmlNode* GetNode() { return m_node; }
wxString GetClass() { return m_class; }
wxObject* GetParent() { return m_parent; }
wxObject* GetInstance() { return m_instance; }
wxWindow* GetParentAsWindow() { return m_parentAsWindow; }
wxWindow* GetInstanceAsWindow() { return m_instanceAsWindow; }
// turn some protected methods into public via delegation
bool IsOfClass(wxXmlNode *node, const wxString& classname)
{ return wxXmlResourceHandler::IsOfClass(node, classname); }
wxString GetNodeContent(wxXmlNode *node)
{ return wxXmlResourceHandler::GetNodeContent(node); }
bool HasParam(const wxString& param)
{ return wxXmlResourceHandler::HasParam(param); }
wxXmlNode *GetParamNode(const wxString& param)
{ return wxXmlResourceHandler::GetParamNode(param); }
wxString GetParamValue(const wxString& param)
{ return wxXmlResourceHandler::GetParamValue(param); }
void AddStyle(const wxString& name, int value)
{ wxXmlResourceHandler::AddStyle(name, value); }
void AddWindowStyles()
{ wxXmlResourceHandler::AddWindowStyles(); }
int GetStyle(const wxString& param = wxT("style"), int defaults = 0)
{ return wxXmlResourceHandler::GetStyle(param, defaults); }
wxString GetText(const wxString& param, bool translate = TRUE)
{ return wxXmlResourceHandler::GetText(param, translate); }
int GetID()
{ return wxXmlResourceHandler::GetID(); }
wxString GetName()
{ return wxXmlResourceHandler::GetName(); }
bool GetBool(const wxString& param, bool defaultv = FALSE)
{ return wxXmlResourceHandler::GetBool(param, defaultv); }
long GetLong( const wxString& param, long defaultv = 0 )
{ return wxXmlResourceHandler::GetLong(param, defaultv); }
wxColour GetColour(const wxString& param)
{ return wxXmlResourceHandler::GetColour(param); }
wxSize GetSize(const wxString& param = wxT("size"))
{ return wxXmlResourceHandler::GetSize(param); }
wxPoint GetPosition(const wxString& param = wxT("pos"))
{ return wxXmlResourceHandler::GetPosition(param); }
wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0)
{ return wxXmlResourceHandler::GetDimension(param, defaultv); }
wxBitmap GetBitmap(const wxString& param = wxT("bitmap"),
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize)
{ return wxXmlResourceHandler::GetBitmap(param, defaultArtClient, size); }
wxIcon GetIcon(const wxString& param = wxT("icon"),
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize)
{ return wxXmlResourceHandler::GetIcon(param, defaultArtClient, size); }
wxFont GetFont(const wxString& param = wxT("font"))
{ return wxXmlResourceHandler::GetFont(param); }
void SetupWindow(wxWindow *wnd)
{ wxXmlResourceHandler::SetupWindow(wnd); }
void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE)
{ wxXmlResourceHandler::CreateChildren(parent, this_hnd_only); }
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL)
{ wxXmlResourceHandler::CreateChildrenPrivately(parent, rootnode); }
wxObject *CreateResFromNode(wxXmlNode *node,
wxObject *parent, wxObject *instance = NULL)
{ return wxXmlResourceHandler::CreateResFromNode(node, parent, instance); }
wxFileSystem& GetCurFileSystem()
{ return wxXmlResourceHandler::GetCurFileSystem(); }
PYPRIVATE;
};
IMP_PYCALLBACK_OBJECT__pure(wxPyXmlResourceHandler, wxXmlResourceHandler, DoCreateResource);
IMP_PYCALLBACK_BOOL_NODE_pure(wxPyXmlResourceHandler, wxXmlResourceHandler, CanHandle);
%}
//----------------------------------------------------------------------
// Now the version that will be SWIGged.
%name(wxXmlResourceHandler) class wxPyXmlResourceHandler : public wxObject {
public:
wxPyXmlResourceHandler() : wxXmlResourceHandler() {}
//~wxPyXmlResourceHandler();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxXmlResourceHandler)"
// Creates an object (menu, dialog, control, ...) from an XML node.
// Should check for validity.
// parent is a higher-level object (usually window, dialog or panel)
// that is often neccessary to create the resource.
// If instance is non-NULL it should not create a new instance via 'new' but
// should rather use this one, and call its Create method.
wxObject *CreateResource(wxXmlNode *node, wxObject *parent,
wxObject *instance);
// Sets the parent resource.
void SetParentResource(wxXmlResource *res);
wxXmlResource* GetResource() { return m_resource; }
wxXmlNode* GetNode() { return m_node; }
wxString GetClass() { return m_class; }
wxObject* GetParent() { return m_parent; }
wxObject* GetInstance() { return m_instance; }
wxWindow* GetParentAsWindow() { return m_parentAsWindow; }
wxWindow* GetInstanceAsWindow() { return m_instanceAsWindow; }
// Returns true if the node has a property class equal to classname,
// e.g. <object class="wxDialog">.
bool IsOfClass(wxXmlNode *node, const wxString& classname);
// Gets node content from wxXML_ENTITY_NODE
// The problem is, <tag>content<tag> is represented as
// wxXML_ENTITY_NODE name="tag", content=""
// |-- wxXML_TEXT_NODE or
// wxXML_CDATA_SECTION_NODE name="" content="content"
wxString GetNodeContent(wxXmlNode *node);
// Check to see if a parameter exists.
bool HasParam(const wxString& param);
// Finds the node or returns NULL.
wxXmlNode *GetParamNode(const wxString& param);
// Finds the parameter value or returns the empty string.
wxString GetParamValue(const wxString& param);
// Add a style flag (e.g. wxMB_DOCKABLE) to the list of flags
// understood by this handler.
void AddStyle(const wxString& name, int value);
// Add styles common to all wxWindow-derived classes.
void AddWindowStyles();
// Gets style flags from text in form "flag | flag2| flag3 |..."
// Only understads flags added with AddStyle
int GetStyle(const wxString& param = wxPyStyleString, int defaults = 0);
// Gets text from param and does some conversions:
// - replaces \n, \r, \t by respective chars (according to C syntax)
// - replaces _ by & and __ by _ (needed for _File => &File because of XML)
// - calls wxGetTranslations (unless disabled in wxXmlResource)
wxString GetText(const wxString& param, bool translate = TRUE);
// Returns the XRCID.
int GetID();
// Returns the resource name.
wxString GetName();
// Gets a bool flag (1, t, yes, on, true are TRUE, everything else is FALSE).
bool GetBool(const wxString& param, bool defaultv = FALSE);
// Gets the integer value from the parameter.
long GetLong( const wxString& param, long defaultv = 0 );
// Gets colour in HTML syntax (#RRGGBB).
wxColour GetColour(const wxString& param);
// Gets the size (may be in dialog units).
wxSize GetSize(const wxString& param = wxPySizeString);
// Gets the position (may be in dialog units).
wxPoint GetPosition(const wxString& param = wxPyPosString);
// Gets a dimension (may be in dialog units).
wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0);
// Gets a bitmap.
wxBitmap GetBitmap(const wxString& param = wxPyBitmapString,
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize);
// Gets an icon.
wxIcon GetIcon(const wxString& param = wxPyIconString,
const wxArtClient& defaultArtClient = wxART_OTHER,
wxSize size = wxDefaultSize);
// Gets a font.
wxFont GetFont(const wxString& param = wxPyFontString);
// Sets common window options.
void SetupWindow(wxWindow *wnd);
// Creates children.
void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE);
// Helper function.
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL);
// Creates a resource from a node.
wxObject *CreateResFromNode(wxXmlNode *node,
wxObject *parent, wxObject *instance = NULL);
// helper
wxFileSystem& GetCurFileSystem();
};
//----------------------------------------------------------------------
//----------------------------------------------------------------------
%init %{
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
wxXmlInitResourceModule();
wxXmlResource::Get()->InitAllHandlers();
%}
//----------------------------------------------------------------------
// This file gets appended to the shadow class file.
//----------------------------------------------------------------------
%pragma(python) include="_xrcextras.py";

View File

@@ -1,584 +0,0 @@
# This file was created automatically by SWIG.
import xrcc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
def XRCID(str_id):
return wxXmlResource_GetXRCID(str_id)
def XRCCTRL(window, str_id, *ignoreargs):
return window.FindWindowById(XRCID(str_id))
XMLID = XRCID
XMLCTRL = XRCCTRL
class wxXmlResourcePtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self, delfunc=xrcc.delete_wxXmlResource):
if self.thisown == 1:
try:
delfunc(self)
except:
pass
def Load(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_Load,(self,) + _args, _kwargs)
return val
def LoadFromString(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadFromString,(self,) + _args, _kwargs)
return val
def InitAllHandlers(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_InitAllHandlers,(self,) + _args, _kwargs)
return val
def AddHandler(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_AddHandler,(self,) + _args, _kwargs)
return val
def InsertHandler(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_InsertHandler,(self,) + _args, _kwargs)
return val
def ClearHandlers(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_ClearHandlers,(self,) + _args, _kwargs)
return val
def LoadMenu(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadMenu,(self,) + _args, _kwargs)
return val
def LoadMenuBar(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadMenuBar,(self,) + _args, _kwargs)
return val
def LoadMenuBarOnFrame(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadMenuBarOnFrame,(self,) + _args, _kwargs)
return val
def LoadToolBar(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadToolBar,(self,) + _args, _kwargs)
return val
def LoadDialog(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadDialog,(self,) + _args, _kwargs)
if val: val = wxDialogPtr(val)
return val
def LoadOnDialog(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadOnDialog,(self,) + _args, _kwargs)
return val
def LoadPanel(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadPanel,(self,) + _args, _kwargs)
if val: val = wxPanelPtr(val)
return val
def LoadOnPanel(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadOnPanel,(self,) + _args, _kwargs)
return val
def LoadFrame(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadFrame,(self,) + _args, _kwargs)
return val
def LoadOnFrame(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadOnFrame,(self,) + _args, _kwargs)
return val
def LoadObject(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadObject,(self,) + _args, _kwargs)
return val
def LoadOnObject(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadOnObject,(self,) + _args, _kwargs)
return val
def LoadBitmap(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadBitmap,(self,) + _args, _kwargs)
if val: val = wxBitmapPtr(val) ; val.thisown = 1
return val
def LoadIcon(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_LoadIcon,(self,) + _args, _kwargs)
if val: val = wxIconPtr(val) ; val.thisown = 1
return val
def AttachUnknownControl(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_AttachUnknownControl,(self,) + _args, _kwargs)
return val
def GetVersion(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_GetVersion,(self,) + _args, _kwargs)
return val
def CompareVersion(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_CompareVersion,(self,) + _args, _kwargs)
return val
def GetFlags(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_GetFlags,(self,) + _args, _kwargs)
return val
def SetFlags(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_SetFlags,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxXmlResource instance at %s>" % (self.this,)
class wxXmlResource(wxXmlResourcePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(xrcc.new_wxXmlResource,_args,_kwargs)
self.thisown = 1
self.InitAllHandlers()
def wxEmptyXmlResource(*_args,**_kwargs):
val = wxXmlResourcePtr(apply(xrcc.new_wxEmptyXmlResource,_args,_kwargs))
val.thisown = 1
val.InitAllHandlers()
return val
class wxXmlSubclassFactoryPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlSubclassFactory__setCallbackInfo,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxXmlSubclassFactory instance at %s>" % (self.this,)
class wxXmlSubclassFactory(wxXmlSubclassFactoryPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(xrcc.new_wxXmlSubclassFactory,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxXmlSubclassFactory)
class wxXmlPropertyPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def GetName(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlProperty_GetName,(self,) + _args, _kwargs)
return val
def GetValue(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlProperty_GetValue,(self,) + _args, _kwargs)
return val
def GetNext(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlProperty_GetNext,(self,) + _args, _kwargs)
if val: val = wxXmlPropertyPtr(val)
return val
def SetName(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlProperty_SetName,(self,) + _args, _kwargs)
return val
def SetValue(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlProperty_SetValue,(self,) + _args, _kwargs)
return val
def SetNext(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlProperty_SetNext,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxXmlProperty instance at %s>" % (self.this,)
class wxXmlProperty(wxXmlPropertyPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(xrcc.new_wxXmlProperty,_args,_kwargs)
self.thisown = 1
class wxXmlNodePtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self, delfunc=xrcc.delete_wxXmlNode):
if self.thisown == 1:
try:
delfunc(self)
except:
pass
def AddChild(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_AddChild,(self,) + _args, _kwargs)
return val
def InsertChild(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_InsertChild,(self,) + _args, _kwargs)
return val
def RemoveChild(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_RemoveChild,(self,) + _args, _kwargs)
return val
def AddProperty(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_AddProperty,(self,) + _args, _kwargs)
return val
def AddPropertyName(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_AddPropertyName,(self,) + _args, _kwargs)
return val
def DeleteProperty(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_DeleteProperty,(self,) + _args, _kwargs)
return val
def GetType(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_GetType,(self,) + _args, _kwargs)
return val
def GetName(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_GetName,(self,) + _args, _kwargs)
return val
def GetContent(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_GetContent,(self,) + _args, _kwargs)
return val
def GetParent(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_GetParent,(self,) + _args, _kwargs)
if val: val = wxXmlNodePtr(val)
return val
def GetNext(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_GetNext,(self,) + _args, _kwargs)
if val: val = wxXmlNodePtr(val)
return val
def GetChildren(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_GetChildren,(self,) + _args, _kwargs)
if val: val = wxXmlNodePtr(val)
return val
def GetProperties(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_GetProperties,(self,) + _args, _kwargs)
if val: val = wxXmlPropertyPtr(val)
return val
def GetPropVal(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_GetPropVal,(self,) + _args, _kwargs)
return val
def HasProp(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_HasProp,(self,) + _args, _kwargs)
return val
def SetType(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_SetType,(self,) + _args, _kwargs)
return val
def SetName(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_SetName,(self,) + _args, _kwargs)
return val
def SetContent(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_SetContent,(self,) + _args, _kwargs)
return val
def SetParent(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_SetParent,(self,) + _args, _kwargs)
return val
def SetNext(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_SetNext,(self,) + _args, _kwargs)
return val
def SetChildren(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_SetChildren,(self,) + _args, _kwargs)
return val
def SetProperties(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlNode_SetProperties,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxXmlNode instance at %s>" % (self.this,)
class wxXmlNode(wxXmlNodePtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(xrcc.new_wxXmlNode,_args,_kwargs)
self.thisown = 1
def wxXmlNodeEasy(*_args,**_kwargs):
val = wxXmlNodePtr(apply(xrcc.new_wxXmlNodeEasy,_args,_kwargs))
val.thisown = 1
return val
class wxXmlDocumentPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self, delfunc=xrcc.delete_wxXmlDocument):
if self.thisown == 1:
try:
delfunc(self)
except:
pass
def Load(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_Load,(self,) + _args, _kwargs)
return val
def LoadFromStream(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_LoadFromStream,(self,) + _args, _kwargs)
return val
def Save(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_Save,(self,) + _args, _kwargs)
return val
def SaveToStream(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_SaveToStream,(self,) + _args, _kwargs)
return val
def IsOk(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_IsOk,(self,) + _args, _kwargs)
return val
def GetRoot(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_GetRoot,(self,) + _args, _kwargs)
if val: val = wxXmlNodePtr(val)
return val
def GetVersion(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_GetVersion,(self,) + _args, _kwargs)
return val
def GetFileEncoding(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_GetFileEncoding,(self,) + _args, _kwargs)
return val
def SetRoot(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_SetRoot,(self,) + _args, _kwargs)
return val
def SetVersion(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_SetVersion,(self,) + _args, _kwargs)
return val
def SetFileEncoding(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_SetFileEncoding,(self,) + _args, _kwargs)
return val
def GetEncoding(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_GetEncoding,(self,) + _args, _kwargs)
return val
def SetEncoding(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlDocument_SetEncoding,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxXmlDocument instance at %s>" % (self.this,)
class wxXmlDocument(wxXmlDocumentPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(xrcc.new_wxXmlDocument,_args,_kwargs)
self.thisown = 1
def wxXmlDocumentFromStream(*_args,**_kwargs):
val = wxXmlDocumentPtr(apply(xrcc.new_wxXmlDocumentFromStream,_args,_kwargs))
val.thisown = 1
return val
def wxEmptyXmlDocument(*_args,**_kwargs):
val = wxXmlDocumentPtr(apply(xrcc.new_wxEmptyXmlDocument,_args,_kwargs))
val.thisown = 1
return val
class wxXmlResourceHandlerPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler__setCallbackInfo,(self,) + _args, _kwargs)
return val
def CreateResource(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_CreateResource,(self,) + _args, _kwargs)
return val
def SetParentResource(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_SetParentResource,(self,) + _args, _kwargs)
return val
def GetResource(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetResource,(self,) + _args, _kwargs)
if val: val = wxXmlResourcePtr(val)
return val
def GetNode(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetNode,(self,) + _args, _kwargs)
if val: val = wxXmlNodePtr(val)
return val
def GetClass(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetClass,(self,) + _args, _kwargs)
return val
def GetParent(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetParent,(self,) + _args, _kwargs)
return val
def GetInstance(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetInstance,(self,) + _args, _kwargs)
return val
def GetParentAsWindow(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetParentAsWindow,(self,) + _args, _kwargs)
return val
def GetInstanceAsWindow(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetInstanceAsWindow,(self,) + _args, _kwargs)
return val
def IsOfClass(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_IsOfClass,(self,) + _args, _kwargs)
return val
def GetNodeContent(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetNodeContent,(self,) + _args, _kwargs)
return val
def HasParam(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_HasParam,(self,) + _args, _kwargs)
return val
def GetParamNode(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetParamNode,(self,) + _args, _kwargs)
if val: val = wxXmlNodePtr(val)
return val
def GetParamValue(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetParamValue,(self,) + _args, _kwargs)
return val
def AddStyle(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_AddStyle,(self,) + _args, _kwargs)
return val
def AddWindowStyles(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_AddWindowStyles,(self,) + _args, _kwargs)
return val
def GetStyle(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetStyle,(self,) + _args, _kwargs)
return val
def GetText(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetText,(self,) + _args, _kwargs)
return val
def GetID(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetID,(self,) + _args, _kwargs)
return val
def GetName(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetName,(self,) + _args, _kwargs)
return val
def GetBool(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetBool,(self,) + _args, _kwargs)
return val
def GetLong(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetLong,(self,) + _args, _kwargs)
return val
def GetColour(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val) ; val.thisown = 1
return val
def GetSize(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetSize,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def GetPosition(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetPosition,(self,) + _args, _kwargs)
if val: val = wxPointPtr(val) ; val.thisown = 1
return val
def GetDimension(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetDimension,(self,) + _args, _kwargs)
return val
def GetBitmap(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetBitmap,(self,) + _args, _kwargs)
if val: val = wxBitmapPtr(val) ; val.thisown = 1
return val
def GetIcon(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetIcon,(self,) + _args, _kwargs)
if val: val = wxIconPtr(val) ; val.thisown = 1
return val
def GetFont(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetFont,(self,) + _args, _kwargs)
if val: val = wxFontPtr(val) ; val.thisown = 1
return val
def SetupWindow(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_SetupWindow,(self,) + _args, _kwargs)
return val
def CreateChildren(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_CreateChildren,(self,) + _args, _kwargs)
return val
def CreateChildrenPrivately(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_CreateChildrenPrivately,(self,) + _args, _kwargs)
return val
def CreateResFromNode(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_CreateResFromNode,(self,) + _args, _kwargs)
return val
def GetCurFileSystem(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResourceHandler_GetCurFileSystem,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxXmlResourceHandler instance at %s>" % (self.this,)
class wxXmlResourceHandler(wxXmlResourceHandlerPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(xrcc.new_wxXmlResourceHandler,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxXmlResourceHandler)
#-------------- FUNCTION WRAPPERS ------------------
wxXmlResource_AddSubclassFactory = xrcc.wxXmlResource_AddSubclassFactory
wxXmlResource_GetXRCID = xrcc.wxXmlResource_GetXRCID
def wxXmlResource_Get(*_args, **_kwargs):
val = apply(xrcc.wxXmlResource_Get,_args,_kwargs)
if val: val = wxXmlResourcePtr(val)
return val
def wxXmlResource_Set(*_args, **_kwargs):
val = apply(xrcc.wxXmlResource_Set,_args,_kwargs)
if val: val = wxXmlResourcePtr(val)
return val
#-------------- VARIABLE WRAPPERS ------------------
wxXRC_USE_LOCALE = xrcc.wxXRC_USE_LOCALE
wxXRC_NO_SUBCLASSING = xrcc.wxXRC_NO_SUBCLASSING
wxXML_ELEMENT_NODE = xrcc.wxXML_ELEMENT_NODE
wxXML_ATTRIBUTE_NODE = xrcc.wxXML_ATTRIBUTE_NODE
wxXML_TEXT_NODE = xrcc.wxXML_TEXT_NODE
wxXML_CDATA_SECTION_NODE = xrcc.wxXML_CDATA_SECTION_NODE
wxXML_ENTITY_REF_NODE = xrcc.wxXML_ENTITY_REF_NODE
wxXML_ENTITY_NODE = xrcc.wxXML_ENTITY_NODE
wxXML_PI_NODE = xrcc.wxXML_PI_NODE
wxXML_COMMENT_NODE = xrcc.wxXML_COMMENT_NODE
wxXML_DOCUMENT_NODE = xrcc.wxXML_DOCUMENT_NODE
wxXML_DOCUMENT_TYPE_NODE = xrcc.wxXML_DOCUMENT_TYPE_NODE
wxXML_DOCUMENT_FRAG_NODE = xrcc.wxXML_DOCUMENT_FRAG_NODE
wxXML_NOTATION_NODE = xrcc.wxXML_NOTATION_NODE
wxXML_HTML_DOCUMENT_NODE = xrcc.wxXML_HTML_DOCUMENT_NODE
#-------------- USER INCLUDE -----------------------
# The global was removed in favor of static accessor functions. This is for
# backwards compatibility:
wxTheXmlResource = wxXmlResource_Get()
wx.wxXmlNodePtr = wxXmlNodePtr
#----------------------------------------------------------------------
# Create a factory for handling the subclass property of the object tag.
def _my_import(name):
mod = __import__(name)
components = name.split('.')
for comp in components[1:]:
mod = getattr(mod, comp)
return mod
class wxXmlSubclassFactory_Python(wxXmlSubclassFactory):
def __init__(self):
wxXmlSubclassFactory.__init__(self)
def Create(self, className):
assert className.find('.') != -1, "Module name must be specified!"
mname = className[:className.rfind('.')]
cname = className[className.rfind('.')+1:]
module = _my_import(mname)
klass = getattr(module, cname)
inst = klass()
return inst
wxXmlResource_AddSubclassFactory(wxXmlSubclassFactory_Python())

View File

@@ -1,12 +0,0 @@
*.pyc
.DS_Store
._demo.py
.emacs.desktop
.gdb_history
.setup.sh
b.bat
hangman_dict.txt
mimetypes_wdr
setup.bat
test.out
tmphtml.txt

View File

@@ -1,64 +0,0 @@
import sys
from wxPython.wx import *
from wxPython.html import *
import wxPython.lib.wxpTag
#---------------------------------------------------------------------------
class MyAboutBox(wxDialog):
text = '''
<html>
<body bgcolor="#AC76DE">
<center><table bgcolor="#458154" width="100%%" cellspacing="0"
cellpadding="0" border="1">
<tr>
<td align="center">
<h1>wxPython %s</h1>
Running on Python %s<br>
</td>
</tr>
</table>
<p><b>wxPython</b> is a Python extension module that
encapsulates the wxWindows GUI classes.</p>
<p>This demo shows off some of the capabilities
of <b>wxPython</b>. Select items from the menu or tree control,
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-2002.</p>
<p>
<font size="-1">Please see <i>license.txt</i> for licensing information.</font>
</p>
<p><wxp class="wxButton">
<param name="label" value="Okay">
<param name="id" value="wxID_OK">
</wxp></p>
</center>
</body>
</html>
'''
def __init__(self, parent):
wxDialog.__init__(self, parent, -1, 'About the wxPython demo',)
html = wxHtmlWindow(self, -1, size=(420, -1))
py_version = sys.version.split()[0]
html.SetPage(self.text % (wx.__version__, py_version))
btn = html.FindWindowById(wxID_OK)
btn.SetDefault()
ir = html.GetInternalRepresentation()
html.SetSize( (ir.GetWidth()+25, ir.GetHeight()+25) )
self.SetClientSize(html.GetSize())
self.CentreOnParent(wxBOTH)
#---------------------------------------------------------------------------

View File

@@ -1,128 +0,0 @@
"""
<html><body>
This demo shows how to embed an ActiveX control in a wxPython application, (Win32 only.)
<p>
The MakeActiveXClass function dynamically builds a new Class on the fly, that has the
same signature and semantics as wxWindow. This means that when you call the function
you get back a new class that you can use just like wxWindow, (set the size and position,
use in a sizer, etc.) except its contents will be the COM control.
<p>
This demo embeds the Adobe Acrobat Reader, and gives you some buttons for opening a PDF
file, changing pages, etc. that show how to call methods on the COM object. If you don't
have Acrobat Reader 4.0 installed it won't work.
</body></html>
"""
from wxPython.wx import *
if wxPlatform == '__WXMSW__':
from wxPython.lib.activexwrapper import MakeActiveXClass
import win32com.client.gencache
try:
acrobat = win32com.client.gencache.EnsureModule('{CA8A9783-280D-11CF-A24D-444553540000}', 0x0, 1, 3)
except:
raise ImportError("Can't load PDF.OCX, install Acrobat 4.0")
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.pdf = None
sizer = wxBoxSizer(wxVERTICAL)
btnSizer = wxBoxSizer(wxHORIZONTAL)
# this function creates a new class that can be used as
# a wxWindow, but contains the given ActiveX control.
ActiveXWrapper = MakeActiveXClass(acrobat.Pdf)
# create an instance of the new class
self.pdf = ActiveXWrapper( self, -1, style=wxSUNKEN_BORDER)
sizer.Add(self.pdf, 1, wxEXPAND)
btn = wxButton(self, wxNewId(), "Open PDF File")
EVT_BUTTON(self, btn.GetId(), self.OnOpenButton)
btnSizer.Add(btn, 1, wxEXPAND|wxALL, 5)
btn = wxButton(self, wxNewId(), "<-- Previous Page")
EVT_BUTTON(self, btn.GetId(), self.OnPrevPageButton)
btnSizer.Add(btn, 1, wxEXPAND|wxALL, 5)
btn = wxButton(self, wxNewId(), "Next Page -->")
EVT_BUTTON(self, btn.GetId(), self.OnNextPageButton)
btnSizer.Add(btn, 1, wxEXPAND|wxALL, 5)
btnSizer.Add(50, -1, 2, wxEXPAND)
sizer.Add(btnSizer, 0, wxEXPAND)
self.SetSizer(sizer)
self.SetAutoLayout(True)
EVT_WINDOW_DESTROY(self, self.OnDestroy)
def OnDestroy(self, evt):
if self.pdf:
self.pdf.Cleanup()
self.pdf = None
def OnOpenButton(self, event):
dlg = wxFileDialog(self, wildcard="*.pdf")
if dlg.ShowModal() == wxID_OK:
wxBeginBusyCursor()
self.pdf.LoadFile(dlg.GetPath())
wxEndBusyCursor()
dlg.Destroy()
def OnPrevPageButton(self, event):
self.pdf.gotoPreviousPage()
def OnNextPageButton(self, event):
self.pdf.gotoNextPage()
#----------------------------------------------------------------------
def runTest(frame, nb, log):
if wxPlatform == '__WXMSW__':
win = TestPanel(nb, log)
return win
else:
dlg = wxMessageDialog(frame, 'This demo only works on MSW.',
'Sorry', wxOK | wxICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
overview = __doc__
#----------------------------------------------------------------------
if __name__ == '__main__':
class TestFrame(wxFrame):
def __init__(self):
wxFrame.__init__(self, None, -1, "ActiveX test -- Acrobat", size=(640, 480),
style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE)
self.tp = TestPanel(self, sys.stdout)
app = wxPySimpleApp()
frame = TestFrame()
frame.Show(True)
app.MainLoop()

View File

@@ -1,237 +0,0 @@
"""
<html><body>
This demo shows how to embed an ActiveX control in a wxPython
application, (Win32 only.)
<p>
The MakeActiveXClass function dynamically builds a new Class on the
fly, that has the same signature and semantics as wxWindow. This
means that when you call the function you get back a new class that
you can use just like wxWindow, (set the size and position, use in a
sizer, etc.) except its contents will be the COM control.
<p>
This demo embeds the Internet Exploer WebBrowser control, and shows
how to receive events from the COM control. (The title bar and status
bar are updated as pages change, in addition to the log messages being
shown.)
</body></html>
"""
from wxPython.wx import *
if wxPlatform == '__WXMSW__':
from wxPython.lib.activexwrapper import MakeActiveXClass
import win32com.client.gencache
try:
browserModule = win32com.client.gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1)
except:
raise ImportError("IE4 or greater does not appear to be installed.")
#----------------------------------------------------------------------
class TestPanel(wxWindow):
def __init__(self, parent, log, frame=None):
wxWindow.__init__(self, parent, -1,
style=wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE)
self.ie = None
self.log = log
self.current = "http://wxPython.org/"
self.frame = frame
if frame:
self.titleBase = frame.GetTitle()
sizer = wxBoxSizer(wxVERTICAL)
btnSizer = wxBoxSizer(wxHORIZONTAL)
# Make a new class that derives from the WebBrowser class in the
# COM module imported above. This class also derives from wxWindow and
# implements the machinery needed to integrate the two worlds.
theClass = MakeActiveXClass(browserModule.WebBrowser,
eventObj = self)
# Create an instance of that class
self.ie = theClass(self, -1) ##, style=wxSUNKEN_BORDER)
btn = wxButton(self, wxNewId(), "Open", style=wxBU_EXACTFIT)
EVT_BUTTON(self, btn.GetId(), self.OnOpenButton)
btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
btn = wxButton(self, wxNewId(), "Home", style=wxBU_EXACTFIT)
EVT_BUTTON(self, btn.GetId(), self.OnHomeButton)
btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
btn = wxButton(self, wxNewId(), "<--", style=wxBU_EXACTFIT)
EVT_BUTTON(self, btn.GetId(), self.OnPrevPageButton)
btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
btn = wxButton(self, wxNewId(), "-->", style=wxBU_EXACTFIT)
EVT_BUTTON(self, btn.GetId(), self.OnNextPageButton)
btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
btn = wxButton(self, wxNewId(), "Stop", style=wxBU_EXACTFIT)
EVT_BUTTON(self, btn.GetId(), self.OnStopButton)
btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
btn = wxButton(self, wxNewId(), "Search", style=wxBU_EXACTFIT)
EVT_BUTTON(self, btn.GetId(), self.OnSearchPageButton)
btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
btn = wxButton(self, wxNewId(), "Refresh", style=wxBU_EXACTFIT)
EVT_BUTTON(self, btn.GetId(), self.OnRefreshPageButton)
btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
txt = wxStaticText(self, -1, "Location:")
btnSizer.Add(txt, 0, wxCENTER|wxALL, 2)
self.location = wxComboBox(self, wxNewId(), "", style=wxCB_DROPDOWN)
EVT_COMBOBOX(self, self.location.GetId(), self.OnLocationSelect)
EVT_KEY_UP(self.location, self.OnLocationKey)
EVT_CHAR(self.location, self.IgnoreReturn)
btnSizer.Add(self.location, 1, wxEXPAND|wxALL, 2)
sizer.Add(btnSizer, 0, wxEXPAND)
sizer.Add(self.ie, 1, wxEXPAND)
self.ie.Navigate(self.current)
self.location.Append(self.current)
self.SetSizer(sizer)
self.SetAutoLayout(True)
EVT_SIZE(self, self.OnSize)
EVT_WINDOW_DESTROY(self, self.OnDestroy)
def ShutdownDemo(self):
# put the frame title back
if self.frame:
self.frame.SetTitle(self.titleBase)
def OnDestroy(self, evt):
if self.ie:
self.ie.Cleanup()
self.ie = None
self.frame = None
def OnSize(self, evt):
self.Layout()
def OnLocationSelect(self, evt):
url = self.location.GetStringSelection()
self.log.write('OnLocationSelect: %s\n' % url)
self.ie.Navigate(url)
def OnLocationKey(self, evt):
if evt.KeyCode() == WXK_RETURN:
URL = self.location.GetValue()
self.location.Append(URL)
self.ie.Navigate(URL)
else:
evt.Skip()
def IgnoreReturn(self, evt):
print 'IgnoreReturn'
if evt.KeyCode() != WXK_RETURN:
evt.Skip()
def OnOpenButton(self, event):
dlg = wxTextEntryDialog(self, "Open Location",
"Enter a full URL or local path",
self.current, wxOK|wxCANCEL)
dlg.CentreOnParent()
if dlg.ShowModal() == wxID_OK:
self.current = dlg.GetValue()
self.ie.Navigate(self.current)
dlg.Destroy()
def OnHomeButton(self, event):
self.ie.GoHome() ## ET Phone Home!
def OnPrevPageButton(self, event):
self.ie.GoBack()
def OnNextPageButton(self, event):
self.ie.GoForward()
def OnStopButton(self, evt):
self.ie.Stop()
def OnSearchPageButton(self, evt):
self.ie.GoSearch()
def OnRefreshPageButton(self, evt):
self.ie.Refresh2(3)
# The following event handlers are called by the web browser COM
# control since we passed self to MakeActiveXClass. It will look
# here for matching attributes and call them if they exist. See the
# module generated by makepy for details of method names, etc.
def OnBeforeNavigate2(self, pDisp, URL, *args):
self.log.write('OnBeforeNavigate2: %s\n' % URL)
def OnNavigateComplete2(self, pDisp, URL):
self.log.write('OnNavigateComplete2: %s\n' % URL)
self.current = URL
self.location.SetValue(URL)
def OnTitleChange(self, text):
self.log.write('OnTitleChange: %s\n' % text)
if self.frame:
self.frame.SetTitle(self.titleBase + ' -- ' + text)
def OnStatusTextChange(self, text):
self.log.write('OnStatusTextChange: %s\n' % text)
if self.frame:
self.frame.SetStatusText(text)
#----------------------------------------------------------------------
# for the demo framework...
def runTest(frame, nb, log):
if wxPlatform == '__WXMSW__':
win = TestPanel(nb, log, frame)
return win
else:
dlg = wxMessageDialog(frame, 'This demo only works on MSW.',
'Sorry', wxOK | wxICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
overview = __doc__
#----------------------------------------------------------------------
if __name__ == '__main__':
class TestFrame(wxFrame):
def __init__(self):
wxFrame.__init__(self, None, -1, "ActiveX test -- Internet Explorer",
size=(640, 480),
style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE)
self.CreateStatusBar()
self.tp = TestPanel(self, sys.stdout, self)
EVT_CLOSE(self, self.OnCloseWindow)
def OnCloseWindow(self, evt):
self.tp.Destroy()
self.Destroy()
app = wxPySimpleApp()
frame = TestFrame()
frame.Show(True)
app.MainLoop()

View File

@@ -1,12 +0,0 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class ColoredPanel(wxWindow):
def __init__(self, parent, color):
wxWindow.__init__(self, parent, -1, style = wxSIMPLE_BORDER) #wxRAISED_BORDER)
self.SetBackgroundColour(color)
#---------------------------------------------------------------------------

View File

@@ -1,129 +0,0 @@
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.clrList.sort()
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)
rect = self.GetUpdateRegion().GetBox()
dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
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 has 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 = 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()
# On wxGTK there needs to be a panel under wxScrolledWindows if they are
# going to be in a wxNotebook...
class TestPanel(wxPanel):
def __init__(self, parent):
wxPanel.__init__(self, parent, -1)
self.win = TestWindow(self)
EVT_SIZE(self, self.OnSize)
def OnSize(self, evt):
self.win.SetSize(evt.GetSize())
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb)
return win
#----------------------------------------------------------------------
overview = """
"""

View File

@@ -1,115 +0,0 @@
#----------------------------------------------------------------------------
# Name: ColourSelect.py
# Purpose: Colour Selection control display testing on panel for wxPython demo
#
# Author: Lorne White (email: lorne.white@telusplanet.net)
#
# Version 0.6
# Date: Nov 14, 2001
# Licence: wxWindows license
#
# Change Log: Add Label parameter to accommodate updated library code
#
# Cliff Wells (logiplexsoftware@earthlink.net) 2002/03/11
# - added code to demonstrate EVT_COLOURSELECT
# - use sizers
# - other minor "improvements"
#----------------------------------------------------------------------------
from wxPython.wx import *
from wxPython.lib.colourselect import *
#----------------------------------------------------------------------------
class TestColourSelect(wxPanel):
def __init__(self, parent, log):
self.log = log
wxPanel.__init__(self, parent, -1)
self.SetAutoLayout(True)
mainSizer = wxBoxSizer(wxVERTICAL)
self.SetSizer(mainSizer)
t = wxStaticText(self, -1,
"This example uses a colour selection control based on the wxButton\n"
"and wxColourDialog Classes. Click Button to get Colour Values")
mainSizer.Add(t, 0, wxALL, 3)
b = wxButton(self, -1, "Show All Colours")
EVT_BUTTON(self, b.GetId(), self.OnShowAll)
mainSizer.Add(b, 0, wxALL, 3)
buttonSizer = wxFlexGridSizer(1, 2) # sizer to contain all the example buttons
# show a button with all default values
self.colourDefaults = ColourSelect(self, -1)
EVT_COLOURSELECT(self.colourDefaults, self.colourDefaults.GetId(), self.OnSelectColour)
buttonSizer.AddMany([
(wxStaticText(self, -1, "Default Colour/Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL),
(self.colourDefaults, 0, wxALL, 3),
])
# build several examples of buttons with different colours and sizes
buttonData = [
("Default Size", (255, 255, 0), wxDefaultSize, ""),
("Another Size", (255, 0, 255), (60, 20), ""),
("Another Colour", (0, 255, 0), wxDefaultSize, ""),
("Larger Size", (0, 0, 255), (60, 60), ""),
("With a Label", (127, 0, 255), wxDefaultSize, "Colour..."),
("Another Colour/Label", (255, 100, 130), (120, -1), "Choose Colour..."),
]
self.buttonRefs = [] # for saving references to buttons
# build each button and save a reference to it
for name, color, size, label in buttonData:
b = ColourSelect(self, -1, label, color, size = size)
EVT_COLOURSELECT(b, b.GetId(), self.OnSelectColour)
self.buttonRefs.append((name, b)) # store reference to button
buttonSizer.AddMany([
(wxStaticText(self, -1, name), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL),
(b, 0, wxALL, 3),
])
mainSizer.Add(buttonSizer, 0, wxALL, 3)
self.Layout()
def OnSelectColour(self, event):
self.log.WriteText("Colour selected: %s" % str(event.GetValue()))
def OnShowAll(self, event):
# show the state of each button
result = []
colour = self.colourDefaults.GetColour() # default control value
result.append("Default Colour/Size: " + str(colour))
for name, button in self.buttonRefs:
colour = button.GetColour() # get the colour selection button result
result.append(name + ": " + str(colour)) # create string list for easy viewing of results
out_result = ', '.join(result)
self.log.WriteText("Colour Results: " + out_result + "\n")
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestColourSelect(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -1,92 +0,0 @@
from wxPython.wx import *
from wxPython.help import *
#----------------------------------------------------------------------
# We first have to set an application-wide help provider. Normally you
# would do this in your app's OnInit or in other startup code...
provider = wxSimpleHelpProvider()
wxHelpProvider_Set(provider)
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
self.SetHelpText("This is a wxPanel.")
sizer = wxBoxSizer(wxVERTICAL)
cBtn = wxContextHelpButton(self)
cBtn.SetHelpText("wxContextHelpButton")
cBtnText = wxStaticText(self, -1, "This is a wxContextHelpButton. Clicking it puts the\n"
"app into context sensitive help mode.")
cBtnText.SetHelpText("Some helpful text...")
s = wxBoxSizer(wxHORIZONTAL)
s.Add(cBtn, 0, wxALL, 5)
s.Add(cBtnText, 0, wxALL, 5)
sizer.Add(20,20)
sizer.Add(s)
text = wxTextCtrl(self, -1, "Each sub-window can have its own help message",
size=(240, 60), style = wxTE_MULTILINE)
text.SetHelpText("This is my very own help message. This is a really long long long long long long long long long long long long long long long long long long long long message!")
sizer.Add(20,20)
sizer.Add(text)
text = wxTextCtrl(self, -1, "You can also intercept the help event if you like. Watch the log window when you click here...",
size=(240, 60), style = wxTE_MULTILINE)
text.SetHelpText("Yet another context help message.")
sizer.Add(20,20)
sizer.Add(text)
EVT_HELP(text, text.GetId(), self.OnCtxHelp)
text = wxTextCtrl(self, -1, "This one displays the tip itself...",
size=(240, 60), style = wxTE_MULTILINE)
sizer.Add(20,20)
sizer.Add(text)
EVT_HELP(text, text.GetId(), self.OnCtxHelp2)
border = wxBoxSizer(wxVERTICAL)
border.Add(sizer, 0, wxALL, 25)
self.SetAutoLayout(True)
self.SetSizer(border)
self.Layout()
def OnCtxHelp(self, evt):
self.log.write("OnCtxHelp: %s" % evt)
evt.Skip()
def OnCtxHelp2(self, evt):
self.log.write("OnCtxHelp: %s\n" % evt)
tip = wxTipWindow(self, "This is a wxTipWindow")
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """
This demo shows how to encorporate Context Sensitive
help into your applicaiton using the wxSimpleHelpProvider class.
"""
#----------------------------------------------------------------------

View File

@@ -1,347 +0,0 @@
from wxPython.wx import *
import cPickle
#----------------------------------------------------------------------
class DoodlePad(wxWindow):
def __init__(self, parent, log):
wxWindow.__init__(self, parent, -1, style=wxSUNKEN_BORDER)
self.log = log
self.SetBackgroundColour(wxWHITE)
self.lines = []
self.x = self.y = 0
self.SetMode("Draw")
EVT_LEFT_DOWN(self, self.OnLeftDown)
EVT_LEFT_UP(self, self.OnLeftUp)
EVT_RIGHT_UP(self, self.OnRightUp)
EVT_MOTION(self, self.OnMotion)
EVT_PAINT(self, self.OnPaint)
def SetMode(self, mode):
self.mode = mode
if self.mode == "Draw":
self.SetCursor(wxStockCursor(wxCURSOR_PENCIL))
else:
self.SetCursor(wxSTANDARD_CURSOR)
def OnPaint(self, event):
dc = wxPaintDC(self)
self.DrawSavedLines(dc)
def DrawSavedLines(self, dc):
dc.BeginDrawing()
dc.SetPen(wxPen(wxBLUE, 3))
for line in self.lines:
for coords in line:
apply(dc.DrawLine, coords)
dc.EndDrawing()
def OnLeftDown(self, event):
if self.mode == "Drag":
self.StartDragOpperation()
elif self.mode == "Draw":
self.curLine = []
self.x, self.y = event.GetPositionTuple()
self.CaptureMouse()
else:
wxBell()
self.log.write("unknown mode!\n")
def OnLeftUp(self, event):
self.lines.append(self.curLine)
self.curLine = []
self.ReleaseMouse()
def OnRightUp(self, event):
self.lines = []
self.Refresh()
def OnMotion(self, event):
if event.Dragging() and not self.mode == "Drag":
dc = wxClientDC(self)
dc.BeginDrawing()
dc.SetPen(wxPen(wxBLUE, 3))
coords = (self.x, self.y) + event.GetPositionTuple()
self.curLine.append(coords)
apply(dc.DrawLine, coords)
self.x, self.y = event.GetPositionTuple()
dc.EndDrawing()
def StartDragOpperation(self):
# pickle the lines list
linesdata = cPickle.dumps(self.lines, 1)
# create our own data format and use it in a
# custom data object
ldata = wxCustomDataObject(wxCustomDataFormat("DoodleLines"))
ldata.SetData(linesdata)
# Also create a Bitmap version of the drawing
size = self.GetSize()
bmp = wxEmptyBitmap(size.width, size.height)
dc = wxMemoryDC()
dc.SelectObject(bmp)
dc.SetBackground(wxWHITE_BRUSH)
dc.Clear()
self.DrawSavedLines(dc)
dc.SelectObject(wxNullBitmap)
# Now make a data object for the bitmap and also a composite
# data object holding both of the others.
bdata = wxBitmapDataObject(bmp)
data = wxDataObjectComposite()
data.Add(ldata)
data.Add(bdata)
# And finally, create the drop source and begin the drag
# and drop opperation
dropSource = wxDropSource(self)
dropSource.SetData(data)
self.log.WriteText("Begining DragDrop\n")
result = dropSource.DoDragDrop(wxDrag_AllowMove)
self.log.WriteText("DragDrop completed: %d\n" % result)
if result == wxDragMove:
self.lines = []
self.Refresh()
#----------------------------------------------------------------------
class DoodleDropTarget(wxPyDropTarget):
def __init__(self, window, log):
wxPyDropTarget.__init__(self)
self.log = log
self.dv = window
# specify the type of data we will accept
self.df = wxCustomDataFormat("DoodleLines")
self.data = wxCustomDataObject(self.df)
self.SetDataObject(self.data)
# some virtual methods that track the progress of the drag
def OnEnter(self, x, y, d):
self.log.WriteText("OnEnter: %d, %d, %d\n" % (x, y, d))
return d
def OnLeave(self):
self.log.WriteText("OnLeave\n")
def OnDrop(self, x, y):
self.log.WriteText("OnDrop: %d %d\n" % (x, y))
return True
def OnDragOver(self, x, y, d):
#self.log.WriteText("OnDragOver: %d, %d, %d\n" % (x, y, d))
# The value returned here tells the source what kind of visual
# feedback to give. For example, if wxDragCopy is returned then
# only the copy cursor will be shown, even if the source allows
# moves. You can use the passed in (x,y) to determine what kind
# of feedback to give. In this case we return the suggested value
# which is based on whether the Ctrl key is pressed.
return d
# Called when OnDrop returns True. We need to get the data and
# do something with it.
def OnData(self, x, y, d):
self.log.WriteText("OnData: %d, %d, %d\n" % (x, y, d))
# copy the data from the drag source to our data object
if self.GetData():
# convert it back to a list of lines and give it to the viewer
linesdata = self.data.GetData()
lines = cPickle.loads(linesdata)
self.dv.SetLines(lines)
return d # what is returned signals the source what to do
# with the original data (move, copy, etc.) In this
# case we just return the suggested value given to us.
class DoodleViewer(wxWindow):
def __init__(self, parent, log):
wxWindow.__init__(self, parent, -1, style=wxSUNKEN_BORDER)
self.log = log
self.SetBackgroundColour(wxWHITE)
self.lines = []
self.x = self.y = 0
dt = DoodleDropTarget(self, log)
self.SetDropTarget(dt)
EVT_PAINT(self, self.OnPaint)
def SetLines(self, lines):
self.lines = lines
self.Refresh()
def OnPaint(self, event):
dc = wxPaintDC(self)
self.DrawSavedLines(dc)
def DrawSavedLines(self, dc):
dc.BeginDrawing()
dc.SetPen(wxPen(wxRED, 3))
for line in self.lines:
for coords in line:
apply(dc.DrawLine, coords)
dc.EndDrawing()
#----------------------------------------------------------------------
class CustomDnDPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, False))
# Make the controls
text1 = wxStaticText(self, -1,
"Draw a little picture in this window\n"
"then switch the mode below and drag the\n"
"picture to the lower window or to another\n"
"application that accepts BMP's as a drop\n"
"target.\n"
)
rb1 = wxRadioButton(self, -1, "Draw", style=wxRB_GROUP)
rb1.SetValue(True)
rb2 = wxRadioButton(self, -1, "Drag")
rb2.SetValue(False)
text2 = wxStaticText(self, -1,
"The lower window is accepting a\n"
"custom data type that is a pickled\n"
"Python list of lines data.")
self.pad = DoodlePad(self, log)
view = DoodleViewer(self, log)
# put them in sizers
sizer = wxBoxSizer(wxHORIZONTAL)
box = wxBoxSizer(wxVERTICAL)
rbox = wxBoxSizer(wxHORIZONTAL)
rbox.Add(rb1)
rbox.Add(rb2)
box.Add(text1, 0, wxALL, 10)
box.Add(rbox, 0, wxALIGN_CENTER)
box.Add(10,90)
box.Add(text2, 0, wxALL, 10)
sizer.Add(box)
dndsizer = wxBoxSizer(wxVERTICAL)
dndsizer.Add(self.pad, 1, wxEXPAND|wxALL, 5)
dndsizer.Add(view, 1, wxEXPAND|wxALL, 5)
sizer.Add(dndsizer, 1, wxEXPAND)
self.SetAutoLayout(True)
self.SetSizer(sizer)
# Events
EVT_RADIOBUTTON(self, rb1.GetId(), self.OnRadioButton)
EVT_RADIOBUTTON(self, rb2.GetId(), self.OnRadioButton)
def OnRadioButton(self, evt):
rb = self.FindWindowById(evt.GetId())
self.pad.SetMode(rb.GetLabel())
#----------------------------------------------------------------------
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.SetAutoLayout(True)
sizer = wxBoxSizer(wxVERTICAL)
msg = "Custom Drag-And-Drop"
text = wxStaticText(self, -1, "", style=wxALIGN_CENTRE)
text.SetFont(wxFont(24, wxSWISS, wxNORMAL, wxBOLD, False))
text.SetLabel(msg)
w,h = text.GetTextExtent(msg)
text.SetSize(wxSize(w,h+1))
text.SetForegroundColour(wxBLUE)
sizer.Add(text, 0, wxEXPAND|wxALL, 5)
sizer.Add(wxStaticLine(self, -1), 0, wxEXPAND)
sizer.Add(CustomDnDPanel(self, log), 1, wxEXPAND)
self.SetSizer(sizer)
#----------------------------------------------------------------------
def runTest(frame, nb, log):
#win = TestPanel(nb, log)
win = CustomDnDPanel(nb, log)
return win
if __name__ == '__main__':
import sys
class DummyLog:
def WriteText(self, text):
sys.stdout.write(text)
class TestApp(wxApp):
def OnInit(self):
wxInitAllImageHandlers()
self.MakeFrame()
return True
def MakeFrame(self, event=None):
frame = wxFrame(None, -1, "Custom Drag and Drop", size=(550,400))
menu = wxMenu()
menu.Append(6543, "Window")
mb = wxMenuBar()
mb.Append(menu, "New")
frame.SetMenuBar(mb)
EVT_MENU(frame, 6543, self.MakeFrame)
panel = TestPanel(frame, DummyLog())
frame.Show(True)
self.SetTopWindow(frame)
app = TestApp(0)
app.MainLoop()
#----------------------------------------------------------------------
overview = """<html><body>
This demo shows Drag and Drop using a custom data type and a custom
data object. A type called "DoodleLines" is created and a Python
Pickle of a list is actually transfered in the drag and drop
opperation.
A second data object is also created containing a bitmap of the image
and is made available to any drop target that accepts bitmaps, such as
MS Word.
The two data objects are combined in a wxDataObjectComposite and the
rest is handled by the framework.
</body></html>
"""

View File

@@ -1,127 +0,0 @@
#!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: DialogUnits.py
# Purpose: A minimal wxPython program that is a bit smarter than test1.
#
# Author: Robin Dunn
#
# Created: A long time ago, in a galaxy far, far away...
# RCS-ID: $Id$
# Copyright: (c) 1998 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
## import all of the wxPython GUI package
from wxPython.wx import *
#---------------------------------------------------------------------------
## Create a new frame class, derived from the wxPython Frame.
class MyFrame(wxFrame):
def __init__(self, parent, id, title):
# First, call the base class' __init__ method to create the frame
wxFrame.__init__(self, parent, id, title,
wxPoint(100, 100), wxSize(160, 100))
# Associate some events with methods of this class
EVT_SIZE(self, self.OnSize)
EVT_MOVE(self, self.OnMove)
EVT_CLOSE(self, self.OnCloseWindow)
# Add a panel and some controls to display the size and position
panel = wxPanel(self, -1)
wxStaticText(panel, -1, "Size:",
wxDLG_PNT(panel, wxPoint(4, 4)), wxDefaultSize)
wxStaticText(panel, -1, "Pos:",
wxDLG_PNT(panel, wxPoint(4, 16)), wxDefaultSize)
self.sizeCtrl = wxTextCtrl(panel, -1, "",
wxDLG_PNT(panel, wxPoint(24, 4)),
wxDLG_SZE(panel, wxSize(36, -1)),
wxTE_READONLY)
self.posCtrl = wxTextCtrl(panel, -1, "",
wxDLG_PNT(panel, wxPoint(24, 16)),
wxDLG_SZE(panel, wxSize(36, -1)),
wxTE_READONLY)
#print wxDLG_PNT(panel, wxPoint(24, 4)), wxDLG_SZE(panel, wxSize(36, -1))
#print wxDLG_PNT(panel, wxPoint(24, 16)),wxDLG_SZE(panel, wxSize(36, -1))
# This method is called automatically when the CLOSE event is
# sent to this window
def OnCloseWindow(self, event):
# tell the window to kill itself
self.Destroy()
# This method is called by the System when the window is resized,
# because of the association above.
def OnSize(self, event):
size = event.GetSize()
self.sizeCtrl.SetValue("%s, %s" % (size.width, size.height))
# tell the event system to continue looking for an event handler,
# so the default handler will get called.
event.Skip()
# This method is called by the System when the window is moved,
# because of the association above.
def OnMove(self, event):
pos = event.GetPosition()
self.posCtrl.SetValue("%s, %s" % (pos.x, pos.y))
#---------------------------------------------------------------------------
# if running standalone
if __name__ == "__main__":
# Every wxWindows application must have a class derived from wxApp
class MyApp(wxApp):
# wxWindows calls this method to initialize the application
def OnInit(self):
# Create an instance of our customized Frame class
frame = MyFrame(None, -1, "This is a test")
frame.Show(True)
# Tell wxWindows that this is our main window
self.SetTopWindow(frame)
# Return a success flag
return True
app = MyApp(0) # Create an instance of the application class
app.MainLoop() # Tell it to start processing events
#---------------------------------------------------------------------------
# if running as part of the Demo Framework...
def runTest(frame, nb, log):
win = MyFrame(frame, -1, "This is a test")
frame.otherWin = win
win.Show(True)
overview = """\
A simple example that shows how to use Dialog Units.
"""
#----------------------------------------------------------------------------
#

View File

@@ -1,216 +0,0 @@
from wxPython.wx import *
#----------------------------------------------------------------------
class ClipTextPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
#self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, False))
sizer = wxBoxSizer(wxVERTICAL)
sizer.Add(wxStaticText(self, -1,
"Copy/Paste text to/from\n"
"this window and other apps"), 0, wxEXPAND|wxALL, 2)
self.text = wxTextCtrl(self, -1, "", style=wxTE_MULTILINE|wxHSCROLL)
sizer.Add(self.text, 1, wxEXPAND)
hsz = wxBoxSizer(wxHORIZONTAL)
hsz.Add(wxButton(self, 6050, " Copy "), 1, wxEXPAND|wxALL, 2)
hsz.Add(wxButton(self, 6051, " Paste "), 1, wxEXPAND|wxALL, 2)
sizer.Add(hsz, 0, wxEXPAND)
sizer.Add(wxButton(self, 6052, " Copy Bitmap "), 0, wxEXPAND|wxALL, 2)
EVT_BUTTON(self, 6050, self.OnCopy)
EVT_BUTTON(self, 6051, self.OnPaste)
EVT_BUTTON(self, 6052, self.OnCopyBitmap)
self.SetAutoLayout(True)
self.SetSizer(sizer)
def OnCopy(self, evt):
self.do = wxTextDataObject()
self.do.SetText(self.text.GetValue())
wxTheClipboard.Open()
wxTheClipboard.SetData(self.do)
wxTheClipboard.Close()
def OnPaste(self, evt):
do = wxTextDataObject()
wxTheClipboard.Open()
success = wxTheClipboard.GetData(do)
wxTheClipboard.Close()
if success:
self.text.SetValue(do.GetText())
else:
wxMessageBox("There is no data in the clipboard in the required format",
"Error")
def OnCopyBitmap(self, evt):
dlg = wxFileDialog(self, "Choose a bitmap to copy", wildcard="*.bmp")
if dlg.ShowModal() == wxID_OK:
bmp = wxBitmap(dlg.GetFilename(), wxBITMAP_TYPE_BMP)
bmpdo = wxBitmapDataObject(bmp)
wxTheClipboard.Open()
wxTheClipboard.SetData(bmpdo)
wxTheClipboard.Close()
wxMessageBox("The bitmap is now in the Clipboard. Switch to a graphics\n"
"editor and try pasting it in...")
dlg.Destroy()
#----------------------------------------------------------------------
class OtherDropTarget(wxPyDropTarget):
def __init__(self, window, log):
wxPyDropTarget.__init__(self)
self.log = log
self.do = wxFileDataObject()
self.SetDataObject(self.do)
def OnEnter(self, x, y, d):
self.log.WriteText("OnEnter: %d, %d, %d\n" % (x, y, d))
return wxDragCopy
#def OnDragOver(self, x, y, d):
# self.log.WriteText("OnDragOver: %d, %d, %d\n" % (x, y, d))
# return wxDragCopy
def OnLeave(self):
self.log.WriteText("OnLeave\n")
def OnDrop(self, x, y):
self.log.WriteText("OnDrop: %d %d\n" % (x, y))
return True
def OnData(self, x, y, d):
self.log.WriteText("OnData: %d, %d, %d\n" % (x, y, d))
self.GetData()
self.log.WriteText("%s\n" % self.do.GetFilenames())
return d
class MyFileDropTarget(wxFileDropTarget):
def __init__(self, window, log):
wxFileDropTarget.__init__(self)
self.window = window
self.log = log
def OnDropFiles(self, x, y, filenames):
self.window.SetInsertionPointEnd()
self.window.WriteText("\n%d file(s) dropped at %d,%d:\n" %
(len(filenames), x, y))
for file in filenames:
self.window.WriteText(file + '\n')
class MyTextDropTarget(wxTextDropTarget):
def __init__(self, window, log):
wxTextDropTarget.__init__(self)
self.window = window
self.log = log
def OnDropText(self, x, y, text):
self.window.WriteText("(%d, %d)\n%s\n" % (x, y, text))
def OnDragOver(self, x, y, d):
return wxDragCopy
class FileDropPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
#self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, False))
sizer = wxBoxSizer(wxVERTICAL)
sizer.Add(wxStaticText(self, -1, " \nDrag some files here:"),
0, wxEXPAND|wxALL, 2)
self.text = wxTextCtrl(self, -1, "",
style = wxTE_MULTILINE|wxHSCROLL|wxTE_READONLY)
dt = MyFileDropTarget(self, log)
self.text.SetDropTarget(dt)
sizer.Add(self.text, 1, wxEXPAND)
sizer.Add(wxStaticText(self, -1, " \nDrag some text here:"),
0, wxEXPAND|wxALL, 2)
self.text2 = wxTextCtrl(self, -1, "",
style = wxTE_MULTILINE|wxHSCROLL|wxTE_READONLY)
dt = MyTextDropTarget(self.text2, log)
self.text2.SetDropTarget(dt)
sizer.Add(self.text2, 1, wxEXPAND)
self.SetAutoLayout(True)
self.SetSizer(sizer)
def WriteText(self, text):
self.text.WriteText(text)
def SetInsertionPointEnd(self):
self.text.SetInsertionPointEnd()
#----------------------------------------------------------------------
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.SetAutoLayout(True)
outsideSizer = wxBoxSizer(wxVERTICAL)
msg = "Clipboard / Drag-And-Drop"
text = wxStaticText(self, -1, "", style=wxALIGN_CENTRE)
text.SetFont(wxFont(24, wxSWISS, wxNORMAL, wxBOLD, False))
text.SetLabel(msg)
w,h = text.GetTextExtent(msg)
text.SetSize(wxSize(w,h+1))
text.SetForegroundColour(wxBLUE)
outsideSizer.Add(text, 0, wxEXPAND|wxALL, 5)
outsideSizer.Add(wxStaticLine(self, -1), 0, wxEXPAND)
inSizer = wxBoxSizer(wxHORIZONTAL)
inSizer.Add(ClipTextPanel(self, log), 1, wxEXPAND)
inSizer.Add(FileDropPanel(self, log), 1, wxEXPAND)
outsideSizer.Add(inSizer, 1, wxEXPAND)
self.SetSizer(outsideSizer)
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """\
This demo shows some examples of data transfer through clipboard or drag and drop. In wxWindows, these two ways to transfer data (either between different applications or inside one and the same) are very similar which allows to implement both of them using almost the same code - or, in other words, if you implement drag and drop support for your application, you get clipboard support for free and vice versa.
At the heart of both clipboard and drag and drop operations lies the wxDataObject class. The objects of this class (or, to be precise, classes derived from it) represent the data which is being carried by the mouse during drag and drop operation or copied to or pasted from the clipboard. wxDataObject is a "smart" piece of data because it knows which formats it supports (see GetFormatCount and GetAllFormats) and knows how to render itself in any of them (see GetDataHere). It can also receive its value from the outside in a format it supports if it implements the SetData method. Please see the documentation of this class for more details.
Both clipboard and drag and drop operations have two sides: the source and target, the data provider and the data receiver. These which may be in the same application and even the same window when, for example, you drag some text from one position to another in a word processor. Let us describe what each of them should do.
"""

View File

@@ -1,418 +0,0 @@
from wxPython.wx import *
import whrandom, time
#----------------------------------------------------------------------
colours = [
"BLACK",
"BLUE",
"BLUE VIOLET",
"BROWN",
"CYAN",
"DARK GREY",
"DARK GREEN",
"GOLD",
"GREY",
"GREEN",
"MAGENTA",
"NAVY",
"PINK",
"RED",
"SKY BLUE",
"VIOLET",
"YELLOW",
]
#----------------------------------------------------------------------
def makeRandomPoints(num, w, h):
pnts = []
for i in range(num):
x = whrandom.randint(0, w)
y = whrandom.randint(0, h)
pnts.append( (x,y) )
return pnts
def makeRandomLines(num, w, h):
pnts = []
for i in range(num):
x1 = whrandom.randint(0, w)
y1 = whrandom.randint(0, h)
x2 = whrandom.randint(0, w)
y2 = whrandom.randint(0, h)
pnts.append( (x1,y1, x2,y2) )
return pnts
def makeRandomRectangles(num, W, H):
rects = []
for i in range(num):
w = whrandom.randint(10, W/2)
h = whrandom.randint(10, H/2)
x = whrandom.randint(0, W - w)
y = whrandom.randint(0, H - h)
rects.append( (x, y, w, h) )
return rects
def makeRandomText(num):
Np = 8 # number of charcters in text
text = []
for i in range(num):
word = []
for i in range(Np):
c = chr( whrandom.randint(48, 122) )
word.append( c )
text.append( "".join(word) )
return text
def makeRandomPolygons(num, W, H):
Np = 8 # number of points per polygon
polys = []
for i in range(num):
poly = []
for i in range(Np):
x = whrandom.randint(0, W)
y = whrandom.randint(0, H)
poly.append( (x,y) )
polys.append( poly )
return polys
def makeRandomPens(num, cache):
pens = []
for i in range(num):
c = whrandom.choice(colours)
t = whrandom.randint(1, 4)
if not cache.has_key( (c, t) ):
cache[(c, t)] = wxPen(c, t)
pens.append( cache[(c, t)] )
return pens
def makeRandomBrushes(num, cache):
brushes = []
for i in range(num):
c = whrandom.choice(colours)
if not cache.has_key(c):
cache[c] = wxBrush(c)
brushes.append( cache[c] )
return brushes
def makeRandomColors(num):
colors = []
for i in range(num):
c = whrandom.choice(colours)
colors.append(wxNamedColor(c))
return colors
pencache = {}
brushcache = {}
points = None
lines = None
rectangles = None
polygons = None
text = None
pens = None
brushes = None
colors1 = None
colors2 = None
def Init(w, h, n):
global pencache
global brushcache
global points
global lines
global rectangles
global polygons
global text
global pens
global brushes
global colors1
global colors2
# make some lists of random shapes
points = makeRandomPoints(n, w, h)
try:
import Numeric
Apoints = Numeric.array(points)
except:
pass
lines = makeRandomLines(n, w, h)
rectangles = makeRandomRectangles(n, w, h)
polygons = makeRandomPolygons(n, w, h)
text = makeRandomText(n)
# make some random pens and brushes
pens = makeRandomPens(n, pencache)
brushes = makeRandomBrushes(n, brushcache)
# make some random color lists
colors1 = makeRandomColors(n)
colors2 = makeRandomColors(n)
def TestPoints(dc,log):
dc.BeginDrawing()
start = time.time()
dc.SetPen(wxPen("BLACK", 4))
dc.DrawPointList(points)
dc.DrawPointList(points, wxPen("RED", 2))
dc.DrawPointList(points, pens)
dc.EndDrawing()
log.write("DrawTime: %s seconds with DrawPointList\n" % (time.time() - start))
def TestArrayPoints(dc,log):
try:
import Numeric
dc.BeginDrawing()
start = time.time()
dc.SetPen(wxPen("BLACK", 1))
for i in range(1):
dc.DrawPointList(Apoints)
#dc.DrawPointList(Apoints, wxPen("RED", 2))
#dc.DrawPointList(Apoints, pens)
dc.EndDrawing()
log.write("DrawTime: %s seconds with DrawPointList an Numpy Array\n" % (time.time() - start))
except ImportError:
log.write("Couldn't import Numeric")
pass
def TestLines(dc,log):
dc.BeginDrawing()
start = time.time()
dc.SetPen(wxPen("BLACK", 2))
dc.DrawLineList(lines)
dc.DrawLineList(lines, wxPen("RED", 2))
dc.DrawLineList(lines, pens)
dc.EndDrawing()
log.write("DrawTime: %s seconds with DrawLineList\n" % (time.time() - start))
def TestRectangles(dc,log):
dc.BeginDrawing()
start = time.time()
dc.SetPen( wxPen("BLACK",1) )
dc.SetBrush( wxBrush("RED") )
dc.DrawRectangleList(rectangles)
dc.DrawRectangleList(rectangles,pens)
dc.DrawRectangleList(rectangles,pens[0],brushes)
dc.DrawRectangleList(rectangles,pens,brushes[0])
dc.DrawRectangleList(rectangles,None,brushes)
## for i in range(10):
## #dc.DrawRectangleList(rectangles,pens,brushes)
## dc.DrawRectangleList(rectangles)
dc.EndDrawing()
log.write("DrawTime: %s seconds with DrawRectanglesList\n" % (time.time() - start))
def TestEllipses(dc,log):
dc.BeginDrawing()
start = time.time()
dc.SetPen( wxPen("BLACK",1) )
dc.SetBrush( wxBrush("RED") )
dc.DrawEllipseList(rectangles)
dc.DrawEllipseList(rectangles,pens)
dc.DrawEllipseList(rectangles,pens[0],brushes)
dc.DrawEllipseList(rectangles,pens,brushes[0])
dc.DrawEllipseList(rectangles,None,brushes)
dc.DrawEllipseList(rectangles,pens,brushes)
dc.EndDrawing()
log.write("DrawTime: %s seconds with DrawEllipsesList\n" % (time.time() - start))
def TestRectanglesArray(dc,log):
try:
import Numeric
Apoints = Numeric.array(rectangles)
dc.BeginDrawing()
start = time.time()
dc.SetPen(wxPen("BLACK", 1))
dc.DrawRectangleList(rectangles)
dc.DrawRectangleList(rectangles,pens)
dc.DrawRectangleList(rectangles,pens[0],brushes)
dc.DrawRectangleList(rectangles,pens,brushes[0])
dc.DrawRectangleList(rectangles,None,brushes)
## for i in range(10):
## #dc.DrawRectangleList(rectangles,pens,brushes)
## dc.DrawRectangleList(rectangles)
dc.EndDrawing()
log.write("DrawTime: %s seconds with DrawRectangleList and Numpy Array\n" % (time.time() - start))
except ImportError:
log.write("Couldn't import Numeric")
pass
def TestRectanglesLoop(dc,log):
dc.BeginDrawing()
start = time.time()
dc.DrawRectangleList(rectangles,pens,brushes)
log.write("DrawTime: %s seconds with DrawRectanglesList\n" % (time.time() - start))
start = time.time()
for i in range(len(rectangles)):
dc.SetPen( pens[i] )
dc.SetBrush( brushes[i] )
dc.DrawRectangle(rectangles[i][0],rectangles[i][1],rectangles[i][2],rectangles[i][3])
dc.EndDrawing()
log.write("DrawTime: %s seconds with Python loop\n" % (time.time() - start))
def TestPolygons(dc,log):
dc.BeginDrawing()
start = time.time()
dc.SetPen(wxPen("BLACK", 1))
dc.DrawPolygonList(polygons)
dc.DrawPolygonList(polygons,pens)
dc.DrawPolygonList(polygons,pens[0],brushes)
dc.DrawPolygonList(polygons,pens,brushes[0])
dc.DrawPolygonList(polygons,None,brushes)
log.write("DrawTime: %s seconds with DrawPolygonList\n" % (time.time() - start))
dc.EndDrawing()
def TestText(dc,log):
dc.BeginDrawing()
start = time.time()
# NOTE: you need to set BackgroundMode for the background colors to be used.
dc.SetBackgroundMode(wxSOLID)
foreground = colors1
background = colors2
dc.DrawTextList(text, points, foreground, background)
log.write("DrawTime: %s seconds with DrawTextList\n" % (time.time() - start))
dc.EndDrawing()
class TestNB(wxNotebook):
def __init__(self, parent, id, log):
style = wxNB_BOTTOM
if wxPlatform == "__WXMAC__":
style = 0
wxNotebook.__init__(self, parent, id, style=style)
self.log = log
win = DrawPanel(self, TestEllipses, log)
self.AddPage(win, 'Ellipses')
win = DrawPanel(self, TestText, log)
self.AddPage(win, 'Text')
win = DrawPanel(self, TestPolygons, log)
self.AddPage(win, 'Polygons')
win = DrawPanel(self, TestPoints, log)
self.AddPage(win, 'Points')
win = DrawPanel(self, TestLines, log)
self.AddPage(win, 'Lines')
win = DrawPanel(self, TestRectangles, log)
self.AddPage(win, 'Rectangles')
class DrawPanel(wxPanel):
def __init__(self, parent, drawFun, log):
wxPanel.__init__(self, parent, -1)
self.SetBackgroundColour(wxWHITE)
self.log = log
self.drawFun = drawFun
EVT_PAINT(self, self.OnPaint)
def OnPaint(self, evt):
dc = wxPaintDC(self)
dc.Clear()
self.drawFun(dc,self.log)
#----------------------------------------------------------------------
def runTest(frame, nb, log):
w = nb.GetClientSize().width
h = nb.GetClientSize().height
if w < 600: w = 600
if h < 400: h = 400
Init(w, h, 200)
win = TestNB(nb, -1, log)
return win
#----------------------------------------------------------------------
overview = """\
Some methods have been added to wxDC to help with optimization of
drawing routines. Currently they are:
<pre>
DrawPointList(sequence, pens=None)
</pre>
Where sequence is a tuple, list, whatever of 2 element tuples
(x, y) and pens is either None, a single pen or a list of pens.
<pre>
DrawLineList(sequence, pens=None)
</pre>
Where sequence is a tuple, list, whatever of 4 element tuples
(x1,y1, x2,y2) andd pens is either None, a single pen or a list
of pens.
<pre>
DrawRectangleList(rectangles, pens=None, brushes=None)
</pre>
<pre>
DrawEllipseList(ellipses, pens=None, brushes=None)
</pre>
<pre>
DrawPolygonList(polygons, pens=None, brushes=None)
</pre>
<pre>
DrawTextList(textList, coords, foregrounds = None, backgrounds = None)
</pre>
"""
if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])])

View File

@@ -1,179 +0,0 @@
# demo for ErrorDialogs.py
# usual wxWindows license stuff here.
# by Chris Fama, with thanks to Robin Dunn, and others on the wxPython-users
# mailing list.
from wxPython.wx import *
from wxPython.lib.ErrorDialogs import *
_debug = 0
ID_TEXT = 10000
ID_BUTTON_wxPyNonFatalError = 10001
ID_BUTTON_wxPyFatalError = 10002
ID_BUTTON_wxPyFatalErrorDialog = 10003
ID_BUTTON_wxPyNonFatalErrorDialog = 10004
ID_BUTTON_wxPyFatalErrorDialogWithTraceback = 10005
ID_BUTTON_wxPyNonFatalErrorDialogWithTraceback = 10006
def ErrorDialogsDemoPanelFunc( parent, call_fit = True, set_sizer = True ):
item0 = wxBoxSizer( wxVERTICAL )
item1 = wxStaticText( parent, ID_TEXT, "Please select one of the buttons below for an example using explicit errors...", wxDefaultPosition, wxDefaultSize, 0 )
item0.AddWindow( item1, 0, wxALIGN_CENTRE|wxALL, 5 )
item2 = wxFlexGridSizer( 0, 2, 0, 0 )
item3 = wxButton( parent, ID_BUTTON_wxPyNonFatalError, "wxPyNonFatalError", wxDefaultPosition, wxDefaultSize, 0 )
item2.AddWindow( item3, 0, wxALIGN_CENTRE|wxALL, 5 )
item4 = wxButton( parent, ID_BUTTON_wxPyFatalError, "wxPyFatalError", wxDefaultPosition, wxDefaultSize, 0 )
item2.AddWindow( item4, 0, wxALIGN_CENTRE|wxALL, 5 )
item0.AddSizer( item2, 0, wxALIGN_CENTRE|wxALL, 5 )
item5 = wxStaticText( parent, ID_TEXT, "Please select one of the buttons below for interpreter errors...", wxDefaultPosition, wxDefaultSize, 0 )
item0.AddWindow( item5, 0, wxALIGN_CENTRE|wxALL, 5 )
item6 = wxFlexGridSizer( 0, 2, 0, 0 )
item7 = wxButton( parent, ID_BUTTON_wxPyFatalErrorDialog, "wxPyFatalErrorDialog", wxDefaultPosition, wxDefaultSize, 0 )
item6.AddWindow( item7, 0, wxALIGN_CENTRE|wxALL, 5 )
item8 = wxButton( parent, ID_BUTTON_wxPyNonFatalErrorDialog, "wxPyNonFatalErrorDialog", wxDefaultPosition, wxDefaultSize, 0 )
item6.AddWindow( item8, 0, wxALIGN_CENTRE|wxALL, 5 )
item9 = wxButton( parent, ID_BUTTON_wxPyFatalErrorDialogWithTraceback, "wxPyFatalErrorDialogWithTraceback", wxDefaultPosition, wxDefaultSize, 0 )
item6.AddWindow( item9, 0, wxALIGN_CENTRE|wxALL, 5 )
item10 = wxButton( parent, ID_BUTTON_wxPyNonFatalErrorDialogWithTraceback, "wxPyNonFatalErrorDialogWithTraceback", wxDefaultPosition, wxDefaultSize, 0 )
item10.SetDefault()
item6.AddWindow( item10, 0, wxALIGN_CENTRE|wxALL, 5 )
item0.AddSizer( item6, 0, wxALIGN_CENTRE|wxALL, 5 )
item11 = wxFlexGridSizer( 0, 2, 0, 0 )
item0.AddSizer( item11, 0, wxALIGN_CENTRE|wxALL, 5 )
if set_sizer == True:
parent.SetAutoLayout( True )
parent.SetSizer( item0 )
if call_fit == True:
item0.Fit( parent )
item0.SetSizeHints( parent )
return item0
# Menu bar functions
# Bitmap functions
# End of generated file
class MyPanel(wxPanel):
def __init__(self,parent=None):
wxPanel.__init__(self,parent,-1)
args = (None, -1)
kwargs = {
'programname': "sumthing",
'mailto': "me@sumwear",
'whendismissed': "from wxPython.wx import * ; wxBell()"}
self.dialogs = map(apply,
[wxPyNonFatalErrorDialogWithTraceback,
wxPyNonFatalErrorDialog,#WithTraceback
wxPyFatalErrorDialogWithTraceback,
wxPyFatalErrorDialog],#WithTraceback
(args,) * 4,
(kwargs,) * 4)
ErrorDialogsDemoPanelFunc(self)
EVT_BUTTON(self,
ID_BUTTON_wxPyFatalErrorDialog,
self.DoDialog)
EVT_BUTTON(self,
ID_BUTTON_wxPyNonFatalError,
self.DoDialog)
EVT_BUTTON(self,
ID_BUTTON_wxPyFatalError,
self.DoDialog)
EVT_BUTTON(self,
ID_BUTTON_wxPyFatalErrorDialogWithTraceback,
self.DoDialog)
EVT_BUTTON(self,
ID_BUTTON_wxPyNonFatalErrorDialog,
self.DoDialog)
EVT_BUTTON(self,
ID_BUTTON_wxPyNonFatalErrorDialogWithTraceback,
self.DoDialog)
IndexFromID = {
ID_BUTTON_wxPyFatalErrorDialog: 3,
ID_BUTTON_wxPyFatalErrorDialogWithTraceback: 2,
ID_BUTTON_wxPyNonFatalErrorDialog: 1,
ID_BUTTON_wxPyNonFatalErrorDialogWithTraceback: 0
}
def DoDialog(self,event):
id = event.GetId()
if id in [ID_BUTTON_wxPyFatalError,ID_BUTTON_wxPyNonFatalError]:
if id == ID_BUTTON_wxPyFatalError:
print "%s.DoDialog(): testing explicit wxPyFatalError..."\
% self
wxPyFatalError(self,"Test Non-fatal error.<p>"
"Nearly arbitrary HTML (i.e., that which is"
" understood by <B><I>wxHtmlWindow</i></b>)."
"<p><table border=\"2\"><tr><td>This</td><td>is</td></tr>"
"<tr><td>a</td><td>table</td></tr></table></p>")
else:
print "%s.DoDialog(): testing explicit wxPyNonFatalError..."\
% self
wxPyNonFatalError(self,"Test Non-fatal error.<p>"
"Nearly arbitrary HTML (i.e., that which is"
" understood by <B><I>wxHtmlWindow</i></b>)."
"<p><table border=\"2\"><tr><td>This</td><td>is</td></tr>"
"<tr><td>a</td><td>table</td></tr></table></p>")
else:
sys.stderr = self.dialogs[self.IndexFromID[id]]
print "%s.DoDialog(): testing %s..." % (self,sys.stderr)
this_will_generate_a_NameError_exception
def ShutdownDemo(self):
for d in self.dialogs:
d.Destroy()
class MyFrame(wxFrame):
def __init__(self,parent=None):
wxFrame.__init__(self,parent,-1,
"Please make a selection...",
)
self. panel = MyPanel(self)
EVT_CLOSE (self,self.OnCloseWindow)
def OnCloseWindow(self,event):
self.panel.Close()
self.Destroy()
class MyApp(wxApp):
def OnInit(self):
frame = MyFrame()
frame.Show(True)
self.SetTopWindow(frame)
return True
def runTest(pframe, nb, log):
panel = MyPanel(nb)
return panel
from wxPython.lib import ErrorDialogs
ErrorDialogs._debug = 1
if __name__ == "__main__":
sys.stderr = wxPyNonWindowingErrorHandler()
app = MyApp(0)
app.MainLoop()
sys.exit()
else:
overview = ErrorDialogs.__doc__

View File

@@ -1,287 +0,0 @@
#---------------------------------------------------------------------------
# Name: EventManager.py
# Purpose: A module to demonstrate wxPython.lib.evtmgr.EventManager.
#
# Author: Robb Shecter (robb@acm.org)
#
# Created: 16-December-2002
# Copyright: (c) 2002 by Robb Shecter (robb@acm.org)
# Licence: wxWindows license
#---------------------------------------------------------------------------
from wxPython.wx import *
from wxPython.lib.evtmgr import eventManager
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
fsize = self.GetFont().GetPointSize()
f1 = wxFont(fsize+0, wxSWISS, wxNORMAL, wxNORMAL)
f2 = wxFont(fsize+2, wxSWISS, wxNORMAL, wxBOLD)
f3 = wxFont(fsize+6, wxSWISS, wxNORMAL, wxBOLD)
title1 = wxStaticText(self, -1, 'EventManager')
title1.SetFont(f3)
txt = """\
This demo shows (1) basic uses and features of the EventManager, as well
as (2) how it helps with a real-world task: creating independent, object-
oriented components."""
message0 = wxStaticText(self, -1, txt)
message0.SetFont(f1)
title2 = wxStaticText(self, -1, 'Event Listeners')
title2.SetFont(f2)
txt = """\
These objects listen to motion events from the target window, using the ability
to register one event with multiple listeners. They also register for mouse events
on themselves to implement toggle-button functionality."""
message1 = wxStaticText(self, -1, txt)
message1.SetFont(f1)
title3 = wxStaticText(self, -1, 'Target Window')
title3.SetFont(f2)
txt = """\
A passive window that's used as an event generator. Move the mouse over it to
send events to the listeners above."""
message2 = wxStaticText(self, -1, txt)
message2.SetFont(f1)
targetPanel = Tile(self, log, bgColor=wxColor(80,10,10), active=0)
buttonPanel = wxPanel(self ,-1)
sizer = wxBoxSizer(wxHORIZONTAL)
target = targetPanel.tile
sizer.Add(0,0,1)
for factor in [0.2, 0.3, 0.4, 0.5, 0.6, 0.7]:
sizer.Add(Tile(buttonPanel, log, factor-0.05, target), 0, wxALIGN_CENTER)
sizer.Add(0,0,1)
sizer.Add(Tile(buttonPanel, log, factor, target), 0, wxALIGN_CENTER)
sizer.Add(0,0,1)
buttonPanel.SetAutoLayout(1)
buttonPanel.SetSizer(sizer)
sizer.Fit(buttonPanel)
sizer = wxBoxSizer(wxVERTICAL)
sizer.Add(title1, 0, wxALIGN_CENTER | wxTOP | wxBOTTOM, 6)
sizer.Add(message0, 0, wxALIGN_CENTER | wxALL, 6)
sizer.Add(title2, 0, wxALIGN_CENTER | wxLEFT | wxTOP | wxRIGHT, 16)
sizer.Add(message1, 0, wxALIGN_CENTER | wxALL, 6)
sizer.Add(buttonPanel, 0, wxEXPAND | wxLEFT | wxBOTTOM | wxRIGHT, 16)
sizer.Add(title3, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, 16)
sizer.Add(message2, 0, wxALIGN_CENTER | wxALL, 6)
sizer.Add(targetPanel, 2, wxEXPAND | wxLEFT | wxBOTTOM | wxRIGHT, 16)
self.SetAutoLayout(1)
self.SetSizer(sizer)
class Tile(wxPanel):
"""
This outer class is responsible for changing
its border color in response to certain mouse
events over its contained 'InnerTile'.
"""
normal = wxColor(150,150,150)
active = wxColor(250,245,245)
hover = wxColor(210,220,210)
def __init__(self, parent, log, factor=1, thingToWatch=None, bgColor=None, active=1, size=(38,38), borderWidth=3):
wxPanel.__init__(self, parent, -1, size=size, style=wxCLIP_CHILDREN)
self.tile = InnerTile(self, log, factor, thingToWatch, bgColor)
self.log = log
sizer = wxBoxSizer(wxHORIZONTAL)
sizer.Add(self.tile, 1, wxEXPAND | wxALL, borderWidth)
self.SetAutoLayout(1)
self.SetSizer(sizer)
self.Layout()
self.SetBackgroundColour(Tile.normal)
if active:
# Register myself for mouse events over self.tile in order to
# create typical button/hyperlink visual effects.
eventManager.Register(self.setHover, EVT_ENTER_WINDOW, self.tile)
eventManager.Register(self.setNormal, EVT_LEAVE_WINDOW, self.tile)
eventManager.Register(self.setActive, EVT_LEFT_DOWN, self.tile)
eventManager.Register(self.setHover, EVT_LEFT_UP, self.tile)
def setHover(self, event):
self.SetBackgroundColour(Tile.hover)
self.Refresh()
def setActive(self, event):
self.SetBackgroundColour(Tile.active)
self.Refresh()
def setNormal(self, event):
self.SetBackgroundColour(Tile.normal)
self.Refresh()
class InnerTile(wxPanel):
IDLE_COLOR = wxColor( 80, 10, 10)
START_COLOR = wxColor(200, 70, 50)
FINAL_COLOR = wxColor( 20, 80,240)
OFF_COLOR = wxColor(185,190,185)
# Some pre-computation.
DELTAS = map(lambda a,b: b-a, START_COLOR.Get(), FINAL_COLOR.Get())
START_COLOR_TUPLE = START_COLOR.Get()
"""
This inner panel changes its color in reaction to mouse
events over the 'thingToWatch'.
"""
def __init__(self, parent, log, factor, thingToWatch=None, bgColor=None):
wxPanel.__init__(self, parent, -1)
self.log=log
if bgColor:
self.SetBackgroundColour(bgColor)
if thingToWatch:
self.factor = factor
self.thingToWatch = thingToWatch
self.state = 0
self.toggleOnOff()
# Watch for the mouse click to enable/disable myself.
eventManager.Register(self.toggleOnOff, EVT_LEFT_UP, self)
def toggleOnOff(self, event=None):
# Implement being on or off by registering and
# de-registering self.makeColor() from the event manager.
if self.state:
eventManager.DeregisterListener(self.makeColor)
else:
eventManager.Register(self.makeColor, EVT_MOTION, self.thingToWatch)
self.state = 1 - self.state
self.resetColor()
def resetColor(self, event=None):
if self.state:
self.setColor(InnerTile.IDLE_COLOR)
else:
self.setColor(InnerTile.OFF_COLOR)
def setColor(self, color):
self.SetBackgroundColour(color)
self.Refresh()
def makeColor(self, mouseEvent):
self.makeColorFromTuple(mouseEvent.GetPositionTuple())
def makeColorFromTuple(self, (x, y)):
MAX = 180.0
scaled = min((x + y) * self.factor, MAX) # In range [0..MAX]
percent = scaled / MAX
r = InnerTile.START_COLOR_TUPLE[0] + (InnerTile.DELTAS[0] * percent)
g = InnerTile.START_COLOR_TUPLE[1] + (InnerTile.DELTAS[1] * percent)
b = InnerTile.START_COLOR_TUPLE[2] + (InnerTile.DELTAS[2] * percent)
self.setColor(wxColor(r,g,b))
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """<html><body>
<h2>EventManager</h2>
<p> The goal of the EventManager is to make wxWindows events more
'Pythonic' (ie. object-oriented) and easier to work with, without
impacting performance. It offers these features:
<p>
<ul>
<li> Allows any number of listeners to register for a single
event. (In addition to the standard wxPython feature of a single
listener being able to respond to many events.)
<li> Makes it easy to disconnect and reconnect listeners. This
has the effect of reducing the need for case-based branching in
application code.
<li> Has an object-oriented API. Programmers register to get
events directly from the objects that generate them, instead of
using ID numbers.
</ul>
<h3>Usage</h3>
<p>The EventManager class has three public methods. First get a
reference to it:
<PRE>
from wxPython.lib.evtmgr import eventManager
</PRE>
<p>...and then invoke any of the following methods. These methods are
'safe'; duplicate registrations or de-registrations will have no
effect.
<p><b>Registering a listener:</b>
<PRE>
eventManager.Register(listener, event, event-source)
</PRE>
<p><b>De-registering by window:</b>
<PRE>
eventManager.DeregisterWindow(event-source)
</PRE>
<p><b>De-registering by listener:</b>
<PRE>
eventManager.DeregisterListener(listener)
</PRE>
<p><b>Simple Example:</b>
<PRE>
from wxPython.lib.evtmgr import eventManager
aButton = wxButton(somePanel, -1, 'Click me')
eventManager.Register(self.someMethod, EVT_BUTTON, aButton)
</PRE>
<p> See the demo code as well as the documentation in the source of
<tt>wxPython.lib.evtmgr</tt> for more details.
<p>
by Robb Shecter (robb@acm.org)
</body></html>
"""
if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])])

View File

@@ -1,40 +0,0 @@
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
#----------------------------------------------------------------------
overview = fancytext.__doc__.replace("<", "&lt;")

View File

@@ -1,76 +0,0 @@
""" 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,DirBrowseButton
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, ID, log):
wxPanel.__init__(self, parent, ID)
self.log = log
self.fbb = FileBrowseButton(self, -1, wxPoint(20,20), wxSize(450, -1),
changeCallback = self.fbbCallback)
self.fbbh = FileBrowseButtonWithHistory(self, -1, wxPoint(20, 50),
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'])
def fbbCallback(self, evt):
self.log.write('FileBrowseButton: %s\n' % evt.GetString())
def fbbhCallback(self, evt):
if hasattr(self, 'fbbh'):
value = evt.GetString()
self.log.write('FileBrowseButtonWithHistory: %s\n' % value)
history = self.fbbh.GetHistory()
history.append(value)
self.fbbh.SetHistory(history)
def dbbCallback(self, evt):
self.log.write('DirBrowseButton: %s\n' % evt.GetString())
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, -1, log)
return win
#----------------------------------------------------------------------
overview = """<html><body>
<h2>class FileBrowseButton:</h2>
<small><pre>
%s
</pre></small>
<h2>class FileBrowseButtonWithHistory(FileBrowseButton):</h2>
<small><pre>
%s
</pre></small>
<h2>class DirBrowseButton(FileBrowseButton):</h2>
<small><pre>
%s
</pre></small>
</body><</html>
""" % ( FileBrowseButton.__doc__,
FileBrowseButtonWithHistory.__doc__ ,
str(DirBrowseButton.__doc__) )

View File

@@ -1,76 +0,0 @@
from wxPython.wx import *
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
e = wxFontEnumerator()
e.EnumerateFacenames()
list = e.GetFacenames()
list.sort()
s1 = wxStaticText(self, -1, "Face names:")
self.lb1 = wxListBox(self, -1, wxDefaultPosition, (200, 250),
list, wxLB_SINGLE)
EVT_LISTBOX(self, self.lb1.GetId(), self.OnSelect)
self.txt = wxStaticText(self, -1, "Sample text...", (285, 50))
row = wxBoxSizer(wxHORIZONTAL)
row.Add(s1, 0, wxALL, 5)
row.Add(self.lb1, 0, wxALL, 5)
row.Add(self.txt, 0, wxALL, 5)
sizer = wxBoxSizer(wxVERTICAL)
sizer.Add(row, 0, wxALL, 30)
self.SetSizer(sizer)
self.Layout()
self.lb1.SetSelection(0)
def OnSelect(self, evt):
face = self.lb1.GetStringSelection()
font = wxFont(28, wxDEFAULT, wxNORMAL, wxNORMAL, False, face)
self.txt.SetFont(font)
self.txt.SetSize(self.txt.GetBestSize())
## st = font.GetNativeFontInfo().ToString()
## ni2 = wxNativeFontInfo()
## ni2.FromString(st)
## font2 = wxFontFromNativeInfo(ni2)
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """<html><body>
wxFontEnumerator enumerates either all available fonts on the system or only
the ones with given attributes - either only fixed-width (suited for use in
programs such as terminal emulators and the like) or the fonts available in
the given encoding.
</body></html>
"""
if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])])

View File

@@ -1,143 +0,0 @@
from wxPython.wx import *
from wxPython.lib.buttons import *
import images
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
sizer = wxFlexGridSizer(1, 3, 20, 20)
b = wxButton(self, -1, "A real button")
b.SetDefault()
EVT_BUTTON(self, b.GetId(), self.OnButton)
sizer.Add(b)
b = wxButton(self, -1, "non-default")
EVT_BUTTON(self, b.GetId(), self.OnButton)
sizer.Add(b)
sizer.Add(10,10)
b = wxGenButton(self, -1, 'Hello')
EVT_BUTTON(self, b.GetId(), self.OnButton)
sizer.Add(b)
b = wxGenButton(self, -1, 'disabled')
EVT_BUTTON(self, b.GetId(), self.OnButton)
b.Enable(False)
sizer.Add(b)
b = wxGenButton(self, -1, 'bigger')
EVT_BUTTON(self, b.GetId(), self.OnBiggerButton)
b.SetFont(wxFont(20, wxSWISS, wxNORMAL, wxBOLD, False))
b.SetBezelWidth(5)
###b.SetBestSize()
b.SetBackgroundColour("Navy")
b.SetForegroundColour(wxWHITE)
b.SetToolTipString("This is a BIG button...")
sizer.Add(b, flag=wxADJUST_MINSIZE) # let the sizer set best size
bmp = images.getTest2Bitmap()
b = wxGenBitmapButton(self, -1, bmp)
EVT_BUTTON(self, b.GetId(), self.OnButton)
sizer.Add(b)
bmp = images.getTest2Bitmap()
b = wxGenBitmapButton(self, -1, bmp)
EVT_BUTTON(self, b.GetId(), self.OnButton)
sizer.Add(b)
b.Enable(False)
b = wxGenBitmapButton(self, -1, None)
EVT_BUTTON(self, b.GetId(), self.OnButton)
bmp = images.getBulb1Bitmap()
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapLabel(bmp)
bmp = images.getBulb2Bitmap()
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapSelected(bmp)
b.SetBestSize()
sizer.Add(b)
b = wxGenToggleButton(self, -1, "Toggle Button")
EVT_BUTTON(self, b.GetId(), self.OnToggleButton)
sizer.Add(b)
b = wxGenBitmapToggleButton(self, -1, None)
EVT_BUTTON(self, b.GetId(), self.OnToggleButton)
bmp = images.getBulb1Bitmap()
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapLabel(bmp)
bmp = images.getBulb2Bitmap()
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapSelected(bmp)
b.SetToggle(True)
b.SetBestSize()
sizer.Add(b)
b = wxGenBitmapTextButton(self, -1, None, "Bitmapped Text", size = (200, 45))
EVT_BUTTON(self, b.GetId(), self.OnButton)
bmp = images.getBulb1Bitmap()
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapLabel(bmp)
bmp = images.getBulb2Bitmap()
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapSelected(bmp)
b.SetUseFocusIndicator(False)
b.SetBestSize()
sizer.Add(b)
border = wxBoxSizer(wxVERTICAL)
border.Add(sizer, 0, wxALL, 25)
self.SetSizer(border)
def OnButton(self, event):
self.log.WriteText("Button Clicked: %d\n" % event.GetId())
def OnBiggerButton(self, event):
self.log.WriteText("Bigger Button Clicked: %d\n" % event.GetId())
b = event.GetEventObject()
txt = "big " + b.GetLabel()
b.SetLabel(txt)
self.GetSizer().Layout()
def OnToggleButton(self, event):
msg = (event.GetIsDown() and "on") or "off"
self.log.WriteText("Button %d Toggled: %s\n" % (event.GetId(), msg))
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
import wxPython.lib.buttons
overview = wxPython.lib.buttons.__doc__
if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])])

Some files were not shown because too many files have changed in this diff Show More