Compare commits

..

667 Commits

Author SHA1 Message Date
Bryan Petty
c6440f0a90 This commit was manufactured by cvs2svn to create tag
'wxPython-2_1b3'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/wxPython-2_1b3@3555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-02 06:01:53 +00:00
Robin Dunn
107e4716f2 Prep for wxPython 2.1b3 release
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-02 06:01:53 +00:00
Robin Dunn
aa855f21a8 updated version number for DLL name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-02 05:39:56 +00:00
Robin Dunn
2f78bd2c04 fixed a clash in values for wxSlider styles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-02 05:38:48 +00:00
Robin Dunn
ac1edf3546 wxPython doc updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-02 05:36:39 +00:00
Robin Dunn
efc5f22463 Prep for wxPython 2.1b3 release
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-02 05:31:38 +00:00
Robin Dunn
27d6502f98 removed a test value left in by accident
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-01 20:58:27 +00:00
Robin Dunn
fd4ff3bf16 Some build updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-01 20:54:34 +00:00
Robin Dunn
8a35299aa9 Added sh-bang
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-01 20:53:22 +00:00
Guilhem Lavaux
bc83ea24b4 Write 0 to m_lastcount in OnSysRead and OnSysWrite
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-01 18:05:15 +00:00
Harco de Hilster
6245e5b6e8 change to make wxHtmlHelp more flexible; don't panic if an empty
index or contents filename is given


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-31 23:26:36 +00:00
Harco de Hilster
5ca24bf4e0 added wxHtmlHelpController and -System wrappers. See README for some remarks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-31 23:22:34 +00:00
Harco de Hilster
6a94433573 some changes to make wxHtmlHelpController easier to subclass
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-31 23:18:41 +00:00
Václav Slavík
18027d49b9 ScanParam has only one parameter now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-31 20:05:24 +00:00
Guilhem Lavaux
babd4308f2 Fixed wxZlibOutputStream::Sync
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-31 18:16:23 +00:00
Julian Smart
5360828db9 Added Set/GetSelection to wxPrintDialogData (the value of the Selection radio button);
corrected bug in cursor.cpp (used wxIconRefData).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-31 12:03:05 +00:00
Michael Bedward
311227c3fe Fixes for scrolling in wxScrolledWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-31 05:36:29 +00:00
Michael Bedward
70bdacfc8e ifdef'd out call to dc.FloodFill() for WXMOTIF (not implemented).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-31 03:45:39 +00:00
Václav Slavík
72aa4a9873 wxHtmlTag::ScanParam now returns value
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-30 22:39:56 +00:00
Václav Slavík
499f945e99 removed html/version.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-30 22:37:41 +00:00
Patrick Albert
aeb50f8660 removing w4 level warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-30 08:35:04 +00:00
Patrick Albert
197dd9af26 Removing most of level 4 warnings, particulary in 16 bits mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-30 07:11:47 +00:00
Harco de Hilster
c15d098cdf fixed problem in mimetype database and put a temp. fix for font tags
like <FONT SIZE=gaga>, i.e. without an proper integer argument


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 20:08:53 +00:00
Guillermo Rodriguez Garcia
f0d922cf78 fixed bug for 24bit images
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 20:02:07 +00:00
Guillermo Rodriguez Garcia
ba7c80a26c *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 20:00:09 +00:00
Guillermo Rodriguez Garcia
7aaacad553 binary
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 19:57:47 +00:00
Guillermo Rodriguez Garcia
771b931d92 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 19:56:05 +00:00
Guilhem Lavaux
7a50d5403c PNM horse
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 19:55:41 +00:00
Guillermo Rodriguez Garcia
307959d652 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 19:49:57 +00:00
Guillermo Rodriguez Garcia
ccc0d1f2b6 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 19:49:13 +00:00
Guilhem Lavaux
6319afe332 Removed LastError() from wxFilterStream
Added a better Peek() to wxBufferedInputStream
Fixed wxPNMHandler (it is a lot faster on text PNM now)
Image sample loads a PNM


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 19:48:03 +00:00
Guillermo Rodriguez Garcia
6cc24024d6 Added horse.pcx
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 19:40:56 +00:00
Guillermo Rodriguez Garcia
91ffcaf2f6 binary
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 19:38:29 +00:00
Guillermo Rodriguez Garcia
fb8b9da2ba *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 19:36:16 +00:00
Guilhem Lavaux
b83290c3eb Start xanim only when we are ready to play
Renamed StartPlay in Play
Added wxVideoBaseDriver::GetSize


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 14:40:11 +00:00
Sylvain Bougnoux
a2b8bd5537 Fixed wxBufferedInputStream support ...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 13:32:50 +00:00
Guillermo Rodriguez Garcia
2e36534843 PCX image for testing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 11:53:05 +00:00
Guillermo Rodriguez Garcia
4df78dc36e PCX handler now working for reading (8bit and 24bit images).
Still no wxPCXHandler::SaveFile, though.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 11:52:02 +00:00
Guillermo Rodriguez Garcia
e08e239b43 Added error messages when (verbose == TRUE) to know why the
load failed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 11:50:57 +00:00
Sylvain Bougnoux
8bb8ab39dd fixed unsolved link
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 07:49:13 +00:00
Michael Bedward
dfdc56a3b0 Regenerated from tmake to add imagpcx.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 06:37:03 +00:00
Michael Bedward
f3391ea5e0 Script runs tmake for all template files in distrib/msw/tmake.
Writes wxMSW makefiles to src/msw.
Writes Makefile.in to top wxWindows dir.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 06:30:50 +00:00
Michael Bedward
ef3a5c9e09 A shell script to run tmake for all template files similar to
Vadim's makeall.bat for DOS.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 05:49:52 +00:00
Michael Bedward
75ceb69db0 Regenerated with tmake to add imagpcx for all platforms.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-29 05:12:08 +00:00
Robert Roebling
6a2a235ba9 Added German translation to internat sample.
Fixed recursion in wxLogGui::Flush()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-28 16:50:39 +00:00
Harco de Hilster
d39356d524 Added a hack to configure.in to enable cross compiling of glcanvas; search
for GL_TOOLKIT_DIR to see what I mean. Added Makefile.in to glcanvas/win


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-28 15:31:13 +00:00
Guilhem Lavaux
aa95f52ee7 Fixed compilation/link errors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-28 12:28:22 +00:00
Guilhem Lavaux
0662cd3286 Implemented Read in the PCM converter
Changed size_t to wxUint32
Added support for G72X
WAV format multi-codec handling


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 17:40:40 +00:00
Guillermo Rodriguez Garcia
5b4f8dd5c0 CanRead() now restores the stream to its previous state (potential
bug when mixing with other handlers' CanRead() code.)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 16:00:13 +00:00
Karsten Ballüder
d559158225 included imagpcx for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 15:23:55 +00:00
Patrick Albert
79bc2382e3 Adding GetPrevSibling() & GetNextSibling() in winundef.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 13:16:09 +00:00
Patrick Albert
2ba3d4f0dd Adding GetFisrtChild in winundef.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 11:56:22 +00:00
Patrick Albert
48c12cb129 Removing some level 3 warning
Updating samples\makefile.vc


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 11:46:55 +00:00
Guillermo Rodriguez Garcia
cbd4be25b2 Added testing code for PCX Handler (which is still not working
because PCX Handler is still a do-nothing and besides, there is
no horse.pcx file, but hey... it doesn't hurt)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 11:42:47 +00:00
Guillermo Rodriguez Garcia
2080bf4f44 Added imagpcx.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 11:34:02 +00:00
Guillermo Rodriguez Garcia
6523d1198f Added wxBITMAP_TYPE_PCX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 11:31:35 +00:00
Guillermo Rodriguez Garcia
b9943f8e8f Added PCX Handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 11:31:07 +00:00
Guillermo Rodriguez Garcia
8a68d8b6c1 small change (honour 'verbose' parameter in LoadFile)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 11:29:10 +00:00
Guillermo Rodriguez Garcia
56c667557e New PCX Image Handler (still empty)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 11:28:28 +00:00
Michael Bedward
cfcab3d203 Fix for compilation under AIX.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 08:23:56 +00:00
Michael Bedward
d127d9360f Fixes for compilation under AIX.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-27 08:22:32 +00:00
Guilhem Lavaux
1bd3e1efef Better fix for thread sample code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-26 18:04:46 +00:00
Guilhem Lavaux
9baf15cea6 Fixed thread sample SEGV on wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-26 17:35:00 +00:00
Patrick Albert
3372145d9d Solving link problem with 16 bits versions (wxProcessEvent, wxSpinEvent)
Various makefile.dos in Samples/ dir are now up-to-date
msvc\Ctl3dv2.lib changed to a valid one


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-26 17:05:33 +00:00
Robert Roebling
a6f3598d2b Distrib and make install fixes.
Docs for wxSizer finished.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-26 16:15:38 +00:00
Michael Bedward
b86de524c7 Changed value setting code in ctor and function SetValue so that widget uses a copy of the source string rather than a pointer to the source string. This fixes problems with wxGrid.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-26 04:41:56 +00:00
Robin Dunn
b164fb385a Better uninstall handling and some other tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-26 04:05:01 +00:00
Guilhem Lavaux
0ac77ef5c8 Fixed a bug in threadpsx.cpp (wxBaseArray bug).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-25 17:48:48 +00:00
Guilhem Lavaux
503aa33d55 Added wxSound for Windows support (successful WAV playback on VC++ 5)
Fixes/Updates for the rest.
PNM decoder uses now wxBufferedInputStream to (to be tested).
Support for G72X is on the road ...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-25 17:22:26 +00:00
Robert Roebling
641d87d868 Many distribution things.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-25 16:39:29 +00:00
Harco de Hilster
45e726de6b fixed mingw32 problem. Now correctly deals with egcs / <=gcc-2.8 issue.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-25 13:47:04 +00:00
Michael Bedward
6970c7b916 Fixed bug (hopefully) that caused windows to be only partially repainted. Last update rect was being missed in wxCanvasRepaintProc().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-25 07:52:14 +00:00
Michael Bedward
95814e4902 Fixed but in wxButton::SetDefault() that was causing core dumps when a
generic colour dialog was created.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-25 06:27:57 +00:00
Robin Dunn
c60fc26d55 glcanvas and utils have mode to the modules directory
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-25 04:59:42 +00:00
Robin Dunn
78fa90773a Death to all Makefiles and associates!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-25 04:50:57 +00:00
Michael Bedward
41435ed2e9 Added test for wxUSE_STATLINE so that wizard will compile under wxMotif
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 23:45:06 +00:00
Robin Dunn
f1b34d5aa3 More execute bit setting... (again!)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 23:00:05 +00:00
Robin Dunn
629e313037 More execute bit setting... (again!)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 22:59:27 +00:00
Robin Dunn
77031c5a16 More execute bit setting...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 22:58:29 +00:00
Robin Dunn
bfdafe6372 More execute bit setting...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 22:57:52 +00:00
Robin Dunn
a35c976180 Fixed a typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 22:55:58 +00:00
Guillermo Rodriguez Garcia
3c87527e89 Added CanRead()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 22:13:26 +00:00
Guillermo Rodriguez Garcia
bd2fdefea2 Fixed CanRead(), which incorrectly forced version 89a, thus preventing
valid GIFs with older version numbers (87a) to be loaded correctly. Also,
CanRead() is now in gifdecod.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 22:10:51 +00:00
Robert Roebling
6dfaa4e5d9 Forgot to add the files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 20:30:10 +00:00
Robert Roebling
8636aed896 Added new wxFontDialog,
Added PICFLAGS to parser compilation,
  Implemented COL_CLICK and wxLC_NO_HEADER


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 20:26:06 +00:00
Robin Dunn
799a341cc3 Deleting and re-adding to get the execute bit set
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 20:14:14 +00:00
Robin Dunn
271cb474f8 Deleting and re-adding to get the execute bit set
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 20:13:23 +00:00
Robin Dunn
5c3a94a62a Trying to get the execute bit set by default...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 20:11:29 +00:00
Robin Dunn
233e355cdd Trying to get the execute bit set but default...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 20:10:33 +00:00
Robin Dunn
f32bba383f Build tool updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 19:53:40 +00:00
Sylvain Bougnoux
0a98aa1a4d 2c : check menu was inversely set
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 19:08:52 +00:00
Guilhem Lavaux
09eea162f7 Renamed UnRead to Unread in the doc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 17:38:55 +00:00
Sylvain Bougnoux
2e76d51926 Fixed ctor declaration : some default were missing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 16:17:22 +00:00
Patrick Albert
2996bcde9c Minor corrections to be able to compile with VC++ 1.5C and VC++ 4.1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 15:54:04 +00:00
Harco de Hilster
d1bc9efeff Oops, had forgotten the GL libraries for unix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 13:23:44 +00:00
Julian Smart
2723cfeba2 Minor doc & distrib file changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 13:04:55 +00:00
Harco de Hilster
f786a3b23d - Updated gtk SWIGged files to SWIG 1.1 cvs level
- changed SOURCES treatment in build.py; the path is stripped from the source
file when the object name is derived; this means sources can be anywhere
(typically might be in GENCODEDIR) but the compiled object will always be
in the current dir. (This is how the implicit makefile rule already behaved)
- updated glcanvas/build.cfg for unix builds to copy glcanvas.cpp from
utils/glcanvas (like Setup.in did)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 12:51:54 +00:00
Julian Smart
d50c81d3ad Added WS_VSCROLL, WS_HSCROLL styles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 08:24:36 +00:00
Robin Dunn
cc17753ff6 Some cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 08:05:51 +00:00
Robin Dunn
5148fc8e35 New build system for wxPython. (Still needs some polish but is stable
for me.  Will be doing more testing tomorrow on other platforms and
then will remove the old wxPython build stuff...)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 07:46:54 +00:00
Robin Dunn
a8e3377c03 Moving utils from core to modules
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 07:39:24 +00:00
Robin Dunn
2f0062dfe4 Fixed compile error for gcc 2.95 (was just a warning on other versions...)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 07:19:01 +00:00
Robin Dunn
325274bbf5 Adding new SWIGified sources for wxPython modules
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 07:15:52 +00:00
Robin Dunn
a353a0be68 Added MS VC++ instructions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-24 04:37:16 +00:00
Harco de Hilster
3e0de8a570 disabled windows.h check for cross compiling --- might accidently find
wine headers and we wouldn't want that...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-23 21:13:20 +00:00
Harco de Hilster
a29cd6c0b0 started adding swigged sources
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-23 18:00:34 +00:00
Harco de Hilster
a2241297df gtk and msw build dirs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-23 17:43:44 +00:00
Harco de Hilster
6de7caffec ok
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-23 17:40:06 +00:00
Robert Roebling
3f3cec484d Small optical changes for MSW
Buttons now get at least 80x23 if given
    a default size
  Small compile and distrib changes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-23 15:23:29 +00:00
Harco de Hilster
1db46618f7 added a define STRICT to setup.h (for mingw32-gcc2.95), removed liboldnames
for wxMSW compilation.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-23 12:43:15 +00:00
Robert Roebling
72ed7aae1d Corrected motif makefile (hopefully)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-23 12:30:37 +00:00
Harco de Hilster
742af0714e Your typical c_str => c_str() fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-23 09:26:39 +00:00
Harco de Hilster
0d63916894 small cross-compilation updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-22 23:20:21 +00:00
Harco de Hilster
80d895cd3f Fixes for smoother cross compilation;
- added parser.o to msw objects in unx.t
- made sure 'lexer.c' is included in parser.y when cross compiling wxMSW
- added optional program extention PROGRAM_EXT set by configure, so that
  makeprog.env can create .exe files
- a few additions to setup.h.in (wxUSE_OWNER_DRAWN for wxMSW, hack to fix
a clash with __WINDOWS__ define in wx/deps.h


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-22 22:43:58 +00:00
Harco de Hilster
916d0b6165 A few small fixes for cross compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-22 20:16:23 +00:00
Robert Roebling
65045edde4 Added wxFFileStream base on wxFFile (as opposed to wxFile)
Implemented the "endl" thing for text streams,
  Corrected cursor display for text ctrls,
  Corrected the strange spin button behaviour when dynamically
    changing its range
  Corrcected bug in wxListBox when programmatically unselecting
   an item in multi-select mode (bug reports are getting esoteric)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-22 16:12:48 +00:00
Robert Roebling
e2acb9ae1c Added wxCountingStream for measuring the size of streamed data
Added wxBitmapObject for putting it on the clipboard


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-22 14:10:50 +00:00
Robert Roebling
ac2def68ed makefile typo
wxFileDialog now defaults to cwd, not home
  PS can now print in landscape (although upside-down)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-21 19:14:58 +00:00
Robert Roebling
4130b487dc Doc corrections,
Made colour dialog look slightly nicer,
  Removed generic file dialog from wxMotif


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-21 13:54:32 +00:00
Robert Roebling
ed58dbeab6 Changed a few #include <xxx.h> to #include "xxx.h"
Added endl operator to wxTextStream
  Corrrected a few misbehaviours in wxFileDialog,
  Corrected tab traversal a bit
  Corrected wxImage::SetData() to not copy, but take
    the data and care for ref couting as well


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-20 22:52:21 +00:00
Robert Roebling
5586805bfa Added dependency checking and all that.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-20 19:40:03 +00:00
Robin Dunn
a2c75a028d Added a python note.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-20 19:18:02 +00:00
Stefan Csomor
585ae8cbc0 CW Pro 5 Adaptions (the .old.mcp are the Pro 4 Files)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-20 15:36:30 +00:00
Sylvain Bougnoux
d9bd149456 wxScrollBar::Create() produced always vertical scrollbar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-20 11:40:03 +00:00
Julian Smart
b2a9d5b418 Restored the ability to scroll.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-20 10:10:58 +00:00
Harco de Hilster
bd8aa7e059 ignore this...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-19 20:07:50 +00:00
Robert Roebling
9c8849722a Doc updates, wxsizer et al
wxFileDialog displays current dir now,
 wxTipProvider uses statictext for headline
 messagebox (and other) dialogs now always display
   an OK buttons, unless wxYES_NO is given
 Appending a menu to a menu bar after having called
   wxFrame::SetMenuBar() should now work
 Added test to configure so that it correctly sets
  compiler flags etc if GCC is used on Solaris and
  IRIX instead of CC, also changed default shared
  library create to GCC from G++ on some platforms
  (as previously already Linux)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-19 18:41:41 +00:00
Karsten Ballüder
03443829ac Added support for locales like de_AT.iso-8859-1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-19 14:10:22 +00:00
Karsten Ballüder
7750247f60 Had to add it to make daily recompiles work. :-( Only one file anyway.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-19 12:16:15 +00:00
Sylvain Bougnoux
93dfff5ae6 Implement CanRead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-19 08:24:22 +00:00
J. Russell Smyth
f3b8ef890c Fixed "Bound pointer address" error under GCC-2.95
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-19 05:37:18 +00:00
Robin Dunn
2d0918205a Using a new version of SWIG
A few minor fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 22:37:56 +00:00
Robin Dunn
e8ac7bf221 Added missing files to filelist.txt and regenerated makefiles.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 22:33:35 +00:00
Václav Slavík
0828c0875e added wxImage::CanRead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 21:22:54 +00:00
Robert Roebling
cae5359f18 More wxFileDialog things
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 19:31:50 +00:00
Vadim Zeitlin
772829164b added a simple makefile to regenerate all other makefiles with tmake
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 18:23:03 +00:00
Vadim Zeitlin
b87654f3fd wxWizard added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 18:06:10 +00:00
Sylvain Bougnoux
a8d9809fc0 Added PNM image handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 17:31:34 +00:00
Sylvain Bougnoux
bcc46c7559 Added PNM image handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 17:25:45 +00:00
Vadim Zeitlin
3a3eed31f0 vsscanf test corrected (?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 17:03:20 +00:00
Sylvain Bougnoux
7b2471a060 Added wxImage wxImage::GetSubImage(cont wxRect&) const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 17:01:47 +00:00
Vadim Zeitlin
895fc9cb8b more styles documented
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 16:58:34 +00:00
Robert Roebling
e6daf79489 EMX compilation,
Minor doc changes,
  wxFileDialog optical things,
  wxMessageDlg dimension


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 15:23:15 +00:00
Sylvain Bougnoux
9ce29a28cd change some #ifdef
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 12:50:30 +00:00
Robert Roebling
0b8558681e Whole lot of stuff for new wxFileDialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 11:40:40 +00:00
Robin Dunn
1d99702e4b Using a new version of SWIG
A few minor fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 07:41:59 +00:00
Julian Smart
661dc384df Added gifdecod.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 06:28:59 +00:00
Julian Smart
464122b639 Added gifdecod.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 06:28:20 +00:00
Robin Dunn
21d72d1755 Fix to prevent Assert when there is an empty string in a combobox/choice.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 06:27:58 +00:00
Guilhem Lavaux
eb4642a989 Added a check for -lresolv in configure.in
Removed wxFileInputStream::Peek as it is implemented in wxInputStream::Peek


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-18 06:11:07 +00:00
Robin Dunn
def89c21b6 removed references to local tick_bmp and cross_bmp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-17 22:21:08 +00:00
Robin Dunn
e841d48627 Added cross and tick bitmaps to the main resource file so the DLL would stop
complaining when trying to initialize the proplist module.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-17 22:19:00 +00:00
Guilhem Lavaux
6c5e63761c Make wxMMedia2 compile on VC++ 5
Added makefile for VC++ 5
Warning: sndwin.cpp will not compile, it is unfinished


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-17 17:51:33 +00:00
Robert Roebling
8b17ba727c Added new file dialog
Minor changes to docs and other generic dialogs
  Minor changes to makefiles


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-17 15:55:25 +00:00
Harco de Hilster
4540b0b60f small makefile.vc fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-17 15:14:08 +00:00
Karsten Ballüder
7ac080a1c7 minor fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-17 12:31:34 +00:00
Julian Smart
469eb89edc Fixed bug that wrote incomplete wxExpr files (missing fclose)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-17 10:27:04 +00:00
Sylvain Bougnoux
deb2fec01e Improve wxImage::LoadImage so that image format in not anymore required
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-17 09:27:44 +00:00
Michael Bedward
40d4abbc70 Changed values passed to SetClientSize() in CreateWidgets() so that buttons are not clipped by the dialog margin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-16 23:04:00 +00:00
Robert Roebling
a24657845b Added missing files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-16 20:21:06 +00:00
Robert Roebling
42b4e99e9a Added Prepend() and Remove() methods to wxSizer,
Corrected a stupid bug in it,
  Freshed up wxPropertyXXX to make use of the icons
  in the dialogs.
  Made wxBmpButton inherit from wxButton. Grumble.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-16 20:17:48 +00:00
Karsten Ballüder
0b129e1a85 (hopefully) fixed make install
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-16 13:18:45 +00:00
Robert Roebling
fd9811b137 compile fixes for EMX
minor doc updates
  minor fixes for problems with rdrag and ldrag in tree ctrl and list ctrl


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-16 12:18:40 +00:00
Karsten Ballüder
c62d808272 fixed duplicate inclusion of jpeg source
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-16 09:05:18 +00:00
Michael Bedward
5b96c684f3 Fixed bug in function Flush().
It was testing for !fflush() as error


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-16 07:50:36 +00:00
Vadim Zeitlin
66cd017c29 wxWizard draft
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-15 20:59:50 +00:00
Robert Roebling
515da557f1 Began docs on sizers,
Correted a few other docs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-15 18:35:03 +00:00
Robert Roebling
dc6c62a931 Added and corrected a few more html makefiles,
Corrected wrong buffer size in menu code,
  Turned wxDirDlgg from functional to cool,
  Found a few esoteric bugs in wxListCtrl and
    wxTreeCtrl on the way


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-15 15:18:54 +00:00
Guilhem Lavaux
354616b046 Commited very sort samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-15 10:28:21 +00:00
Guilhem Lavaux
622e48cbd2 Added utils/Makefile.in for utils makefiles
Changed some name in wxMMedia2


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-15 10:15:05 +00:00
Michael Bedward
a3736ef475 Put the call to CheckForKeyDown() back in to ProcessXEvent because key down events are no longer being generated in wxCanvasInputEvent(). If you find yourself getting double key down events then CheckForKeyDown() should be bypassed again (but what is going on ???).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-15 04:19:25 +00:00
Michael Bedward
4c151c737e Added include for wx/window.h to get this to compile.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-15 02:59:41 +00:00
Vadim Zeitlin
43427087aa InsertPage/SetSelection bug fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-14 21:41:46 +00:00
Guilhem Lavaux
526ddb13e2 Removed wxMMedia
Added wxMMedia2: it should work on linux (wave read/write, aiff read only)
      I begin to write windows driver now

Added some file to filelist.txt
Make configure build wxMMedia2 makefiles


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-14 12:06:35 +00:00
Guilhem Lavaux
f1f5976f1f Removed unnecessary branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-14 11:51:39 +00:00
Robert Roebling
b1683d3899 Makefile updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-14 11:14:39 +00:00
Robert Roebling
549c6f67f9 More samples makefiles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-14 09:41:49 +00:00
Vadim Zeitlin
8fe0578285 templates for new sizer classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 20:33:19 +00:00
Robert Roebling
8a5137d74a More makefiles
Corrected two thing in wxDialogBase (empty lines) and
    msgdlg (wrong flags)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 19:39:15 +00:00
Karsten Ballüder
ac15e21dc7 more compilation fixes, some object files were missing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 19:24:13 +00:00
Robert Roebling
a8efa9e391 More smaple makefiles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 18:54:54 +00:00
Václav Slavík
d54ed754ae *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 18:47:07 +00:00
Karsten Ballüder
66635d688c fixes for make install
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 18:22:25 +00:00
Guilhem Lavaux
d4feedcff1 Bug fix in wxBufferedInputStream::SeekI
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 17:49:02 +00:00
Robert Roebling
d1c7850d7e Updated makefiles for printing sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 17:34:53 +00:00
Robert Roebling
27ea1d8aae Added wxStaticBoxSizer,
Makefile updates,
  Improved look of wxGenericPageSetupDialog


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 17:32:30 +00:00
Robert Roebling
4cb122de97 Compile fixes,
Big-endian fix for image.cpp (Untested, I have no sparc)
  Make dist works (more or less)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 14:21:06 +00:00
Robert Roebling
a4aad9613a Started "make dist"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 10:33:08 +00:00
Robert Roebling
e4b4d60e56 Added WINE and probably x-compile makefiles
Fixed busy cursor compilation.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 08:58:58 +00:00
Robert Roebling
75ef19df59 Added setup.h.in
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-13 08:26:34 +00:00
Vadim Zeitlin
e2a1679e71 regenerated makefiles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 20:21:13 +00:00
Julian Smart
c7527e3f21 wxBook additions; added a couple of pixels in menu drawing; taskbar
PopupMenu improvements


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 20:18:18 +00:00
Robert Roebling
ad9edf45f1 Augmented beta to 9,
Removed a few old Makefiles,
  Added one missing one (blush),
  Added first sample makefiles,


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 19:24:39 +00:00
Robert Roebling
517a619dc3 make install, make uninstall and wx-coonfig work again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 17:41:29 +00:00
Karsten Ballüder
eebe401675 Useful little fix that automatically hides the busy cursor in modal dialogs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 15:36:50 +00:00
Sylvain Bougnoux
265b457741 just disable alpha buffer to make it more portable as
many hardware doesn't have a true alpha plane !


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 15:02:44 +00:00
Václav Slavík
c32cfa3641 wxHtmlWidgetCells now destroys window correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 14:03:23 +00:00
Robert Roebling
583a65787f Corrected PNG etc include paths
Added install for Motif (not tested)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 14:02:50 +00:00
Václav Slavík
a47ad26244 minor fix in wxHtmlWindow::CreateLayout
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 13:37:02 +00:00
Václav Slavík
af23d90aa3 fixed crash in tables deallocation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 13:36:55 +00:00
Robert Roebling
2aa887306b New makefile system in place, obsoletes libtool,
autoheader, automake and the testconf directory.
  So far only GTK and only shared libraries.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 12:54:33 +00:00
Karsten Ballüder
bf3e0fbd1f some compilation fixes atttempts for solaris
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 12:18:49 +00:00
Michael Bedward
364c7f3c68 if'd out CheckForKeyDown call that doesn't seem to be necessary now (but we still need CheckForKeyUp() - why???
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 08:51:45 +00:00
J. Russell Smyth
d2befda32f Changed wxBox to wxBoxSizer to fit current API
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-12 05:09:59 +00:00
Vadim Zeitlin
1a5e297c6b wxMenuBar::IsEnabled() now returns TRUE sometimes too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-11 22:54:28 +00:00
Robert Roebling
48b1d0ff4f New makefile updates.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-11 17:40:09 +00:00
Harco de Hilster
b80c8d89d6 README file (sparse) added.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-11 17:26:35 +00:00
Harco de Hilster
4107d4fdd1 updates to some readme's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-11 17:23:17 +00:00
Harco de Hilster
144247aca9 stubs...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-11 17:16:00 +00:00
Harco de Hilster
4b123bb9cc lots'o' wxpython modules files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-11 17:14:49 +00:00
Harco de Hilster
05394a18d4 started adding modules tree...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-11 17:09:18 +00:00
Julian Smart
bed9b80689 Added wxbook.htm.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-11 14:37:10 +00:00
Robert Roebling
c0854a089c Corrected Motif build,
Updated testconf


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-11 13:36:47 +00:00
Robert Roebling
92afa2b150 Did somework on the generic dialogs,
Renamed wxBox -> wxBoxSizer
  Removed old dialog layout code,


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-11 11:53:40 +00:00
Robert Roebling
9635832dbd Forgot one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-10 20:09:45 +00:00
Robert Roebling
8e877c195b New makefiles for GTK and Motif, using configure but not
libtool and automake.
  Numerous Motif crash fixes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-10 20:08:24 +00:00
Guilhem Lavaux
d5b08e7b07 #if => #if defined()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-10 19:59:27 +00:00
Guilhem Lavaux
e96ac54e83 Check for inet_addr/inet_aton.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-10 17:48:11 +00:00
Sylvain Bougnoux
5391f772be better control of what need refresh.
if selection doesn't changed when hit, no event are triggered anymore.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-10 13:13:58 +00:00
Robert Roebling
3a2490c684 Further makefile and compile fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-10 13:12:19 +00:00
Robert Roebling
0ae2df3052 A few compile fixes,
Updated filetxt.txt to include sizer.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-10 12:27:07 +00:00
Robert Roebling
073478b3d0 Updates for makefile.unx
Converted numdlg to use wxSizer
  Corrcted bug in default size of wxStaticLine
  Other optical corrections


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-10 11:23:46 +00:00
Julian Smart
50bcd1ae77 Fixed my fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-10 06:27:10 +00:00
Vadim Zeitlin
a8cb1d29e7 another makefile updated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-09 21:21:23 +00:00
Julian Smart
d66d9d5bf0 A fix for wxTaskBarIcon (temporary wxFrame interfering with app shutdown);
added event handler for tbtest.cpp so it'll quit properly


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-09 20:49:34 +00:00
Guilhem Lavaux
dc26b37a91 Renamed m_blocking to m_non_blocking
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-09 19:14:15 +00:00
J. Russell Smyth
7dee726c7e Changes to allow OLE to compile under mingw32/gcc-2.95
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-09 17:47:28 +00:00
Guilhem Lavaux
98781fa30e Removed unnecessary lines from threadpsx
Renamed GSOCK_TRYAGAIN to GSOCK_WOULDBLOCK
Added GSOCK_TIMEOUT
Enabled the replacement code for timeout handling in gsocket.c
Renamed some var in gsockunx & gsocket


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-09 17:35:30 +00:00
J. Russell Smyth
4b6f0b91ff Corrected check for new mingw32 with new headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-09 17:26:52 +00:00
Robert Roebling
3417c2cd3d Replaced old wxSizer,
Converted two of wxGTK's standard dialogs to use them,
  Applied two fixes to wxDC code,
  Made wxRadiobox a little smaller,
  Added sizer.h to wx.h


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-09 17:00:51 +00:00
Robert Roebling
d597fcb781 Completed wxBox,
Changed a few defines in defs.h, most importantly,
    wxCENTRE is now 1


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-09 11:27:37 +00:00
Michael Bedward
447a039fa3 wxFrame::Create now sets (arbitrary) values for position and size if default values of -1 have been used
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-09 07:23:59 +00:00
Václav Slavík
956418ab76 added MIME manager fallback support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-08 22:28:48 +00:00
Vadim Zeitlin
77671fd2d6 1. regenerated makefiles
2. wxNewSizer compiles under MSW


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-08 21:56:43 +00:00
Robert Roebling
61d514bb2f Finished porting Robin's wxSizers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-08 21:09:59 +00:00
Robert Roebling
c62ac5b6e4 Added wxNewSizer and wxBorderNewSizer with sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-08 16:45:57 +00:00
Václav Slavík
29672bf006 scrollbar doesn't appear anymore in html view
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-08 15:55:21 +00:00
Václav Slavík
60811dc6cc m_Style was bool by mistake, fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-08 15:53:30 +00:00
Václav Slavík
2c997ad008 now has 'help' item in menu
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-08 15:52:31 +00:00
Robert Roebling
5279a24d25 zipstrm link fix
added sizer.h/cpp which don't even compile yet


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-08 13:58:24 +00:00
Robert Roebling
6001e347ba Added strconv
Renamed zipstream -> zipstrm
  Updated makefiles etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-08 11:31:18 +00:00
Vadim Zeitlin
3f1aaa1635 compile fix for Unix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-07 23:20:54 +00:00
Vadim Zeitlin
8e124873c5 wxMimeTypesManager::AddFallbacks() added, also corrected a minor bug/incompatible
behaviour in wxFileType and added a MIME database query demo to typetest sample


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-07 23:10:09 +00:00
Guilhem Lavaux
cc345f7897 Commented setsockopt as it doesn't work anywhere. I will use signals for timeout.
Fixed _GSocket_Init_INET.
Only oriented connections should be shutdowned.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-07 17:03:22 +00:00
Vadim Zeitlin
71f21f464f declared (not implemented yet) wxMimeTypesManager::AddFallbacks()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-07 15:39:29 +00:00
Vadim Zeitlin
aea02638ea test for vsscanf enhanced, added HAVE_VSSCANF to acconfig.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-07 14:44:58 +00:00
Robin Dunn
988238ab15 more distrib things
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 19:03:04 +00:00
Guilhem Lavaux
8f7173abc4 Changed Ungetch(void *, ...) to Ungetch(const void *, ...)
Fixed some bug in gsocket


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 18:23:49 +00:00
Julian Smart
ea4f5235fc Changes for BC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 16:17:40 +00:00
Julian Smart
91c93c9927 Minor additions to FAQ
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 15:59:31 +00:00
Robert Roebling
402a82c6be Minor corrections to samples again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 13:41:55 +00:00
Ove Kaaven
ed8f12be32 TVS_CHECKBOXES doesn't seem to exist in Borland C++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 13:35:31 +00:00
Ove Kaaven
83475efc94 Make it LPNM_UPDOWN, not LPNMUPDOWN, in Borland C++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 13:24:48 +00:00
Robert Roebling
89124b1ac2 Minor changes to samples.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 13:06:11 +00:00
Václav Slavík
7309b92dd7 win32 miniframe added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 11:52:33 +00:00
Václav Slavík
f8c4475a3e converted to 16 colors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 11:51:44 +00:00
Robert Roebling
d422d01eec Distrib things,
Typos in dynarray.h,
  Removed C++ comments from code,
  Added a few #ifdef wxUSE_XXX


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-06 10:10:10 +00:00
Julian Smart
22d6efa851 Cured some bugs/typos/spacing in docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 22:05:15 +00:00
Robert Roebling
e70f5e1301 Compile fix for dynarray,
Use wxStreams in dialoged,
  Small typo in wxApp::OnIdle()
  Distrib things,
  wxPython makefile corrections (libpy.c and libptr.c missing)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 20:38:51 +00:00
Robin Dunn
48e74ff549 fixed compile error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 19:31:15 +00:00
Guilhem Lavaux
60b6c062f8 Changed BidEndianOrdered to BigEndianOrdered in datstrm.h
Seek and Tell do the right thing in wxIn/OutputStream now
Check for GNU extension in configure.in: this is needed for GLIBC 2.1/GCC 2.95
  -> this enables _GNU_SOURCE


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 17:42:09 +00:00
Julian Smart
d7cb14cec9 Corrected some doc problems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 15:51:32 +00:00
Robert Roebling
fb39c7ecd7 Compile fix for button, MSW
Typo in dialogs sample


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 13:58:22 +00:00
Harco de Hilster
c543cdb77b Small fix to correctly generate GENCODEDIR/*.py files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 11:14:47 +00:00
Robert Roebling
956dbab1eb Applied patch for stipppled brushes,
Corrected idle behaviour after popmenu call


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 11:14:07 +00:00
Harco de Hilster
867673d4f2 added install for gsocket.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 10:10:10 +00:00
Julian Smart
edc26c4c2d Added new files to .rsp files; added new samples to index.htm
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 09:33:04 +00:00
Robin Dunn
77ed579e58 more distrib things
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 06:47:57 +00:00
Robin Dunn
3f0be3ec40 more tweaks...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 06:24:45 +00:00
Robin Dunn
923eda0780 more distrib things
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 06:18:34 +00:00
Michael Bedward
60f5b8804b Added a line to set m_font in the wxWindowDC ctor (with window arg) so that GetTextExtent will work properly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 06:14:06 +00:00
Robin Dunn
645ab2ee26 Some tweaks...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 06:10:31 +00:00
Robin Dunn
009a1c89e7 Now uses external SWIG library on win32 too. Simplifies the makefile.vc
somewhat.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 06:09:54 +00:00
Robin Dunn
91ad003f43 Updated WISE scripts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 06:08:55 +00:00
Robin Dunn
f581a26df9 Some minor tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 05:06:50 +00:00
David Webster
c3d434725b *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 04:05:25 +00:00
Robin Dunn
18ac8d6919 Added missing } so tex2rtf wouldn't puke
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 03:47:29 +00:00
Ryan Norton
48bf5def83 Tcl regex lib
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 01:16:55 +00:00
Václav Slavík
48828fc9f0 added fsfile.tex
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 22:40:30 +00:00
Vadim Zeitlin
8c3c31d4a5 wxButton::GetDefaultSize() fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 22:07:01 +00:00
J. Russell Smyth
88b0e1c83d Moved initialization of status bar to eliminate assert caused by new
controls trying to set s-bar text


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 21:19:46 +00:00
J. Russell Smyth
17b0d794e6 made panel use wxSystemSettings::GetColor to make sure colors are right for
user's selected color scheme


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 21:15:37 +00:00
J. Russell Smyth
c5be98a644 Fixed to fill in m_dir member when file selected so that GetDirectory
returns the correct value


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 20:19:40 +00:00
J. Russell Smyth
51929198e4 Minor change to make spinbutton text match spinbutton position on startup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 19:51:51 +00:00
Guilhem Lavaux
54e575f947 GSocket_timeout: timeout support hack (disabled for the moment)
Changed some bool to GSocketError in gsockunx.h


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 18:02:24 +00:00
Robin Dunn
cb1b6606ab Set the version number to use for the DLL in WXVERSION
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 16:33:27 +00:00
Robin Dunn
ccf0b1d76c Now uses the version number when doing a cleandll
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 16:32:42 +00:00
Vadim Zeitlin
36dda0de23 radiobox event now contains the string too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 14:49:37 +00:00
Robert Roebling
e65cc56a3b Minor changes to viusal appearance,
Added wxYield() to wxEndBusyCursor(),
  Made wxSpinButton always sent a wxSROLL_THUMBTRACK event,
  Made wxDirDialog resizable,
  Made gsocket.c compile,


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 14:41:41 +00:00
Robert Roebling
33961d59b0 Compile fixes for samples and dialoged,
small optical improvements,
  distrib changes,
  link fix for treectrl


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 13:01:20 +00:00
Václav Slavík
2356708db3 fixed somebody's poorly done StreamSize-->GetSize transition
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 12:30:06 +00:00
Robin Dunn
6bddd8c5f3 New Makefile/Setup files supporting multiple dynamic extension modules
for unix systems.

Fixes for the wxGLCanvas demo to work around a strange bug in gtk.

SWIG support routines now compiled separately instead of being bundled
in wx.cpp.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 05:26:11 +00:00
David Webster
de44a9f06d *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 04:20:17 +00:00
J. Russell Smyth
65fd5cb012 Made changes to allow build with new mingw32/gcc-2.95
added wxUSE_NORLANDER_HEADERS for mingw32/gcc-2.95


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 00:42:51 +00:00
Václav Slavík
ea8fe90e65 bool scrollable replaced by wxHW_* flags
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-04 00:00:16 +00:00
Václav Slavík
2776d7c3bd malloc() --> new[]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 23:59:38 +00:00
Václav Slavík
a547ebffd6 wxHW_* flags, fixed client area problem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 23:58:56 +00:00
Václav Slavík
d674cf6dc3 added DLL exports
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 23:56:34 +00:00
Václav Slavík
11b63f34f8 initial commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 23:55:45 +00:00
Karsten Ballüder
fa12f7e609 Changed wxChoice->wxComboBox as list of all paper sizes is too large to fit
on screen. Works fine for wxGTK.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 15:20:23 +00:00
Ove Kaaven
c9f9be4510 Hmm, apparently had to add FNSTRINGCAST elsewhere in the file too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 13:05:19 +00:00
Ove Kaaven
ff881f70d3 Changed my mind and used FNSTRINGCAST instead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 13:03:33 +00:00
Ove Kaaven
68abfefc45 Replaced (char*)wxFNCONV with (const char*)wxFNCONV
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 13:02:04 +00:00
Vadim Zeitlin
d5d63453b1 LINKAGEMODE moved to defs.h - string.cpp actually compiles now...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 11:31:47 +00:00
Vadim Zeitlin
3fb98ddfec __UNIX__ redefition corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 11:26:39 +00:00
Vadim Zeitlin
6ccec5fcb2 cliet data crash fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 11:12:14 +00:00
Robin Dunn
7bcd390c94 fixed a typo or two...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 06:48:46 +00:00
Robin Dunn
1dc2f8658b Fixed wxImage GetData and SetData to properly use String objects for
data transfer.

Added access methods to wxGridEvent.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 06:44:28 +00:00
David Webster
849949b13f *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-03 04:36:53 +00:00
Vadim Zeitlin
d22699b5eb 1. minor headers rearrangement: wxprec.h doesn't include setup.h directly
any more, btu defs.h does - and not in the very beginning, but a bit
   later
2. some unused and uncompileable OS2 thing removed from string.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-02 21:31:09 +00:00
Robert Roebling
e46286351d Minor changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-02 19:06:23 +00:00
Guilhem Lavaux
9bb2eb9fd6 Changed a var name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-02 19:00:00 +00:00
Guilhem Lavaux
e00f35bb06 Better memory errors handler (added GSOCK_MEMERR)
Fixed 'NULL' warning in socket.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-02 17:46:43 +00:00
David Webster
1408104d04 Changes to make common and generic compilable under VisualAge C++ V3.0 ofr OS/2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-02 16:39:18 +00:00
Michael Bedward
3ab377bd1a Added code to set m_isBeingDeleted as per wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-02 06:00:17 +00:00
David Webster
913df6f2e0 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-02 04:54:56 +00:00
David Webster
54da4255a2 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-02 04:44:01 +00:00
Michael Bedward
4d194d6368 Added function GetDefaultSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-02 04:19:49 +00:00
Michael Bedward
5af2ff30ec Added these accessor functions for wxGridEvent: GetRow, GetCol, GetPosition, GetCell, ControlDown, ShiftDown
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-02 03:23:35 +00:00
Vadim Zeitlin
10fcf31a2c 1. wxWindow::Centre() hopefully fixed
2. attempts to construct bitmaps from icons properly
3. wxTreeCtrl background is always white


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-01 22:22:02 +00:00
Vadim Zeitlin
4ee14879f2 fix for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-01 22:17:11 +00:00
Robert Roebling
23a54e14a7 Updated testconf,
Compile fixes for docview and iostreams,
  SO_RCVTIMEO doesn't exist everywhere and must
   not be used for setting this option - only
   getting it on some systems
  Distrib things


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-01 11:02:05 +00:00
Guilhem Lavaux
f439844be2 wxMemoryStream doc updated
Added auto-destruction in wxThread::Delete and wxThread::Kill
Fixed thread destruction in thread sample


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-01 07:26:36 +00:00
Vadim Zeitlin
71cbe687e3 compile warning fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-31 21:56:42 +00:00
Robert Roebling
2899e22327 Compile fixes for wxTreeCtrl (we don't speak about
linking or - dear - even running)
  distrib updates




git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-31 17:24:28 +00:00
Vadim Zeitlin
fbdc71e0a7 added a blurb about wxBe
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-31 13:58:34 +00:00
Guilhem Lavaux
9592b68708 Converted some SetBlocking to SetNonBlocking
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-31 13:33:01 +00:00
Julian Smart
97979ddfbe Added news and coding standards HTML files to CVS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-31 09:20:44 +00:00
Robin Dunn
8bf5d46efb wxPython 2.1b1:
Added the missing wxWindow.GetUpdateRegion() method.

	Made a new change in SWIG (update your patches everybody) that
	provides a fix for global shadow objects that get an exception in
	their __del__ when their extension module has already been deleted.
	It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
	line 496 if you want to do it by hand.

	It is now possible to run through MainLoop more than once in any one
	process.  The cleanup that used to happen as MainLoop completed (and
	prevented it from running again) has been delayed until the wxc module
	is being unloaded by Python.

	wxWindow.PopupMenu() now takes a wxPoint instead of  x,y.  Added
	wxWindow.PopupMenuXY to be consistent with some other methods.

	Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.

	You can now provide your own app.MainLoop method.  See
	wxPython/demo/demoMainLoop.py for an example and some explaination.

	Got the in-place-edit for the wxTreeCtrl fixed and added some demo
	code to show how to use it.

	Put the wxIcon constructor back in for GTK as it now has one that
	matches MSW's.

	Added wxGrid.GetCells

	Added wxSystemSettings static methods as functions with names like
	wxSystemSettings_GetSystemColour.

	Removed wxPyMenu since using menu callbacks have been depreciated in
	wxWindows.  Use wxMenu and events instead.

	Added alternate wxBitmap constructor (for MSW only) as
	      wxBitmapFromData(data, type, width, height, depth = 1)

	Added a helper function named wxPyTypeCast that can convert shadow
	objects of one type into shadow objects of another type.  (Like doing
	a down-cast.)  See the implementation in wx.py for some docs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-31 07:56:15 +00:00
Robin Dunn
f91cd38969 some dist helpers for wxPython
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-31 07:21:04 +00:00
David Webster
2179d57968 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-31 03:35:35 +00:00
Vadim Zeitlin
9dfbf520eb wxMSW::wxTreeCtrl has multiple selection too (somewhat documented)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 22:45:55 +00:00
David Webster
717b9bf234 OS/2 updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 21:47:13 +00:00
David Webster
b7a34956cb OS/2 linkage specification on METHODDEF macro
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 21:46:24 +00:00
Vadim Zeitlin
604e7194e1 no more assert failure in GetSelection() if there is no selection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 18:32:17 +00:00
Vadim Zeitlin
3646fd68cb link fix for no sockets compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 18:03:23 +00:00
Guilhem Lavaux
39b91ecabe Renamed GSocket_SetBlocking to GSocket_SetNonBlocking and *Fallback to *Callback
Added GSocket_SetTimeout
Added timeout support in wxSocket (as it was in previous releases)
Updated documentation


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 17:54:18 +00:00
Vadim Zeitlin
aa994705c7 a small fix to wxWindow::Centre
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 17:31:31 +00:00
Vadim Zeitlin
154c4aa113 explicit compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 17:02:44 +00:00
Robert Roebling
7ff14117cb Some more doc beauty,
Typo in wxDataStream,


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 13:16:45 +00:00
Robert Roebling
b453e1b24b Doc corrections,
made wxHTML a chapter
  GUI thread work


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 12:02:28 +00:00
Robin Dunn
dfa13ec8d7 wxPython documentation updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 04:31:52 +00:00
Robin Dunn
19e0e04b93 fixed compiler error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 04:28:24 +00:00
Michael Bedward
978db70ee3 Fixed m_majorDim bug a bit more (was still getting divide by zero error)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 04:20:07 +00:00
Michael Bedward
4a041f2f92 Added KeyRelease case to switch in wxTranslateKeyEvent so that wxApp::CheckForKeyUp will work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 04:01:08 +00:00
Michael Bedward
e2e04ea4a7 Added wxApp::CheckForKeyUp MB
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 03:55:59 +00:00
Michael Bedward
3d9431bf7e Added wxApp::CheckForKeyUp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-30 03:50:03 +00:00
Vadim Zeitlin
d5dbeb3140 #warning is a compilation error, not warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 23:38:06 +00:00
Robert Roebling
f56b833007 Testing vaious makefile/configure schemes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 22:18:41 +00:00
Robert Roebling
8a4df1595b Now its possible to run wxHTML without wxSockets
if wxUSE_FS_ZIP = 1, wxUSE_HTML = 1
  Fixed typo in filelist
  Compile fix for spinbutton,


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 19:52:37 +00:00
Guilhem Lavaux
7e1e096097 Typos.
Changed the timeout of wxSocketBase from 3600s to 600s
Added #include <stdio.h> in htmltag.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 17:23:28 +00:00
Guilhem Lavaux
552e8bf87f Added #include <stddef.h> as it is needed by ANSI.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 17:15:50 +00:00
Karsten Ballüder
7742efff20 fix for HP-UX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 16:12:23 +00:00
Karsten Ballüder
0bcddc59c8 fixed busy cursor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 13:47:18 +00:00
Robert Roebling
9b61f868b5 Compile fixes and typos corrected.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 13:43:08 +00:00
Robert Roebling
631fd4122a Makefile changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 12:51:29 +00:00
Karsten Ballüder
bbdb0e1313 ProgressDialog was *comletely* broken!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 12:51:12 +00:00
Karsten Ballüder
45ccdd76c3 Fixed missing header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 12:21:50 +00:00
Ove Kaaven
04392d70b9 By assigning wxEmptyString instead of NULL to m_commandString,
I hope to reduce the number of crash-on-startup events


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 10:16:49 +00:00
Robin Dunn
f79c001d5d Put strmbfrd.tex back into classes.tex since it was finally checked in.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 06:41:52 +00:00
David Webster
65ccd2b826 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 05:27:19 +00:00
David Webster
0e320a79f1 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 05:11:30 +00:00
David Webster
c2ff79b17b *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 04:56:34 +00:00
Robert Roebling
a1925afc90 I had to remove (Robin's) makefile creation clause
from the makefiles, because these deleted my
    makefiles
  Small fixes for templates




git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-29 01:21:05 +00:00
Vadim Zeitlin
452fd09f36 m_clientData conflict fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 22:53:33 +00:00
Vadim Zeitlin
b1519886c3 SetIcon added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 22:38:39 +00:00
Vadim Zeitlin
52326d0eac compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 22:28:44 +00:00
Vadim Zeitlin
9830033051 string and m_majorDim == 0 bugs fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 22:27:44 +00:00
Robert Roebling
a3015c547a Added tmake template for simple wxGTK makefile
Updated filelist.t for wxGTK
  Compile fixes for MingGW32


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 22:18:58 +00:00
Robin Dunn
0c551f1c23 Changes necessary to make In Place Edit work and look a lot nicer for
MSW and GTK, and hopefully make it easy to make the same tweaks for
other ports.  There are still some very minor anomalies (changing
colors of the grid doesn't change the IPE control, etc.) but it is
definitely useable now.

The IPE control now gets the fore/background color of the cell.

Changed how the current cell highlight is drawn so mulitple clicks in
a single cell don't leave the highlight in an inconsistent state for
GTK.

Changed a dangerous static variable to a member variable.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 21:59:08 +00:00
Vadim Zeitlin
0655ad290a 1. wxSpinButton fixed: it now sends EVT_SPIN_UP/DOWN messages (and unnecessary
old code which didn't send them anyhow removed). It also allows to veto the
   changes, but this feature is not portable and as such is not documented.
2. wxBitmapBuuton doesn't lose its bitmap any more
3. wxImage::ConvertToBitmap() doesn't crash if image is !Ok() but just
   returns wxNullBitmap.
4. wxProgressDialog looks much nicer under Windows and its estimated/elapsed/
   remaining time fields actually show some non random numbers now
5. MDI client window doesn't flicker because wxMDIParentFrame doesn't position
   it at (0, 0) first before moving it to correct location
6. other minor fixes...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 21:01:04 +00:00
Guilhem Lavaux
f61815af20 Added wxInternetFilesystemModule to fs_inet.cpp
Fixed PROXY support in wxURL, wxHTTP. You can set the environement variable
HTTP_PROXY now.
Fixed parsing of content type in wxHtmlFilter
Added commments to gsocket.c
wxURL parses the URL only once now.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 17:29:59 +00:00
Guilhem Lavaux
3de08727ca Added another missing file (wxBufferedStreams doc)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 17:16:59 +00:00
Ove Kaaven
e5b767fff6 Hm... /P1024 instead of /P512 ...? (At least that makes it work for me)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 12:11:58 +00:00
Robin Dunn
3660fc40ad Fixed some stupid TEX errors...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 05:52:04 +00:00
Robin Dunn
a123dde717 If somebody ever decides to actually check in fsfile.tex and
strmbfrd.tex then they an uncomment them back in.  I'm tired of the
errors...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 05:49:51 +00:00
David Webster
bac507e062 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 04:16:50 +00:00
David Webster
e2c87f4cc4 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 04:02:37 +00:00
David Webster
1777b9bbf4 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-28 03:38:12 +00:00
Robert Roebling
2259e00789 Corrected some more docs,
Corrected size of spinbutton
  wxWindow::PopUp() now doesn't return control
    to the program until the menu disappears as
    it is documented and done by wxMSW


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 21:46:34 +00:00
Robert Roebling
4dcaf11a7b Small distrib updates,
tried to find a bug in html which was somewhere else,
  added wxYield() call to wxBeginBusyCursor() which
    should make the cursor appear immediately,
  corrected wxMiniFrame so that clicking on the titlebar
    makes it come to the front
  Used CreateBase() in all controls


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 20:23:13 +00:00
Vadim Zeitlin
813c20a67e wxMotif fixes and common fixes for socket compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 20:12:16 +00:00
Vadim Zeitlin
2d61b48d14 missing wxMSW files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 20:09:15 +00:00
Guilhem Lavaux
31989b0b8f Changed void GSocket_Init() to bool GSocket_Init()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 17:22:30 +00:00
J. Russell Smyth
b116ab033e Added Makefile for gcc-win
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 17:05:05 +00:00
J. Russell Smyth
43871a5df9 Modified dialog size under MSW to look better ( button was cut off)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 17:03:21 +00:00
Guilhem Lavaux
a3c1786def Added the forgotten file txtstrm.tex
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 17:02:58 +00:00
Vadim Zeitlin
193fe98904 wxNO_FULL_REPAINT_ON_RESIZE logic for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 15:15:36 +00:00
Vadim Zeitlin
106e25cccf wxMSW modules now has png and zlib
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 14:38:30 +00:00
Harco de Hilster
58a855e062 minor fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 14:14:27 +00:00
Vadim Zeitlin
d9ea011f4d wxGTK compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 14:09:25 +00:00
Robert Roebling
ca17eff36b wxSocket compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 13:25:16 +00:00
Ove Kaaven
b2158ed0da char -> wxChar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 06:52:32 +00:00
Robin Dunn
2ac1b69a00 Added another button to show wxBitmapButton problem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-27 04:51:03 +00:00
Vadim Zeitlin
8d99be5f53 1. wxChoice and wxComboBox support client data under MSW
2. control creation streamlined under MSW


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 23:02:32 +00:00
Unknown (AN)
bae41ce192 use of div_t.quot and div_t.rem were changed to / and %
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 19:22:21 +00:00
Robert Roebling
e9158f7d8b Next take at radioboxes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 19:03:53 +00:00
Robert Roebling
a62867a56e TreeCtrl:
Size calculation for bold items
    Reduced height per item by 2 pixels


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 18:32:59 +00:00
Robert Roebling
7f7d950530 Added test for wxRA_SPECIFY_COLS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 17:16:08 +00:00
Robert Roebling
5f1ea0eeda Typos in documentation
list and tree ctrl now actually set the text themselves
    and no longer crash
  various compile fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 16:06:20 +00:00
Karsten Ballüder
15a2076a46 destructor for wxMenu deletes menu now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 15:49:28 +00:00
Robert Roebling
fd128b0c3a Added more docs for the new events, derived from wxNotifyEvents.
Added docs for wxScrollWinEvent and corrected docs referring
    to wxScrollEvent etc.
  wxTreeCtrl's and wxListCtrl's ::EditLabel() returns void.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 14:28:25 +00:00
Vadim Zeitlin
6e29a95a9a more fixes for Borland and OLE files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 13:27:31 +00:00
Ove Kaaven
b56baa2d03 More _T()... trying to get to that clipboard sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 11:37:53 +00:00
Vadim Zeitlin
d9d61c23a8 automtn.cpp removed for Borland compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 11:28:18 +00:00
Ove Kaaven
dae3fbd88e Just a _T()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 11:19:46 +00:00
Vadim Zeitlin
2633389890 no more \& in radio buttons labels
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 11:01:58 +00:00
Karsten Ballüder
db8db70a19 Documented help API extension and fixed gsocket compilation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 10:49:50 +00:00
Vadim Zeitlin
0252777919 compile fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 10:48:56 +00:00
Vadim Zeitlin
86f975a858 EditLabel fixes (wxMSW/wxGTK synchronised, docs updated)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 10:46:55 +00:00
Ove Kaaven
23aa4f09d2 More asserts and stuff
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 10:41:38 +00:00
Ove Kaaven
b6caf397b3 Make this compile in Unicode mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 10:32:42 +00:00
Ove Kaaven
24bd64eec1 More asserts (well, checks) without _T()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 10:06:23 +00:00
Vadim Zeitlin
c39eda949d Centre() supports wxCENTER_FRAME flag now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 09:46:53 +00:00
Karsten Ballüder
fa834f81d7 The modules file containing the definition of the CVS modules.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-26 09:38:53 +00:00
Vadim Zeitlin
8ed889787f fixes for PS and OLE files for Borland makefiles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 21:29:59 +00:00
Robert Roebling
0544bc0aab Distrib things
Corrected wxPrivateDataObject a little
  Corrected wxRadioButton
  Corrected wrong defines of wxRadioBox styles


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 17:11:17 +00:00
Robert Roebling
41bf0eb335 Added wxStaticBitmap::SetIcon()
wxDC now inits with a WHITE_BRUSH as wxMSW seems to
   do the same
  small doc updates


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 14:38:28 +00:00
Guilhem Lavaux
a58d5df4ef Added GSocket_Init and GSocket_Cleanup
Added wxSocketModule to socket.cpp to call GSocket_Init and GSocket_Cleanup


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 14:26:15 +00:00
Robert Roebling
e179bd6537 Re-Added wxStream::StreamSize()
Added in-place editting to wxTreeCtrl,
    modified wxListCtrl in-place editting
  Corrected behaviour of wxToolBar::Toggle() to not
    send messages and to report the correct state
  Removed many #include "wx/wx.h" to speed up
   compilation
 Some more compile fixes and tests.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 12:59:58 +00:00
Václav Slavík
a76015e6eb fixed static members
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 12:21:23 +00:00
Václav Slavík
420ec58abb html filters has const methods now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 12:20:58 +00:00
Ove Kaaven
3001340cf4 Unicode compilation fix, just for kicks (was bored after missing some
libraries needed to compile current cvs of abiword)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 11:44:08 +00:00
Ove Kaaven
befa6d980e One sample a day keeps stagnation away
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 06:04:20 +00:00
Ove Kaaven
3a5815b583 Unicode compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 05:41:29 +00:00
Vadim Zeitlin
a35faffd59 oops... compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 23:19:03 +00:00
Vadim Zeitlin
22cf5fec15 wxDialog::IsModal() works
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 23:16:35 +00:00
Vadim Zeitlin
e8b591249e help classes compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 23:12:39 +00:00
Vadim Zeitlin
259d1674f2 wxHTML compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 22:44:22 +00:00
Karsten Ballüder
3bcf00abd7 minor fix to find contents file alright
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 22:38:00 +00:00
Vadim Zeitlin
9f3553c83e fix for C files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 22:17:19 +00:00
Vadim Zeitlin
53f69f7a04 compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 22:05:21 +00:00
Karsten Ballüder
4ba80ec7ff compilation fixes and minor improvements
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 20:28:36 +00:00
Ove Kaaven
9260761613 Needed some variation; got bored of seeing the compilation errors for this
sample in Unicode mode, so now I can see the errors for the next instead


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 12:39:40 +00:00
Robert Roebling
cd25b18c8e Renamed wxStream::StreamSize() to wxStream::GetSize()
Add wxStream bool operator !().
  Made wxTextStream safe for conversion from/to Mac/DOS/Unix
  Added wxFrame::Iconize()
  Applied patch for stippled brushes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 10:50:13 +00:00
Guilhem Lavaux
5a96d2f45f Updated wxDataStream (added ByteOrder)
Removed sckint.cpp from Makefile.am and filelist.txt (Could someone rebuild Makefile for MSW)
Some update to the documentation. I'm documenting GSocket.
Added gsockno.c in stubs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 09:05:25 +00:00
Ove Kaaven
7e256c24fb Unicode fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 06:50:40 +00:00
Ove Kaaven
11aab0d000 wxString(file.fn_str()) doesn't make sense. If just file.fn_str() gives
problems, better to use (FNSTRINGCAST file.fn_str())


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 06:20:37 +00:00
Ove Kaaven
24463897d5 Blargh, every time someone adds an assert or fail thing, I have to add _T()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 06:10:59 +00:00
Vadim Zeitlin
f98e25588d compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 00:26:01 +00:00
Vadim Zeitlin
c193b707eb wxTreeEvent is declared in one header, not 3 of them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-24 00:14:54 +00:00
Vadim Zeitlin
5ea4780630 1. changed spelling error in wxTR_HAS_VARIABLE_HEIGHT (missing 'E')
2. compile fix for dcscreen.cpp
3. editing labels in place works in the tree ctrl and shown in the sample
4. sped up items deletion in the listview


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 23:41:45 +00:00
Robin Dunn
9be9b97445 Added a rule to the tmake templates so the makefiles know how to
rebuild themselves (if you have tmake).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 21:26:57 +00:00
Vadim Zeitlin
5bb05bc139 disabled accelerators in wxMotif - they don't work anyhow, but break
everything


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 21:08:22 +00:00
Vadim Zeitlin
31528cd3ca 1. more wxMotif fixes
2. wxGetNumberFromUser added
3. more compilation fixes when compiling without sockets


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 21:03:02 +00:00
Robert Roebling
c45a644eda Finished MingW32 makefiles
More drawing tests and corrections
  Distrib things


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 18:50:12 +00:00
Guilhem Lavaux
dbd300df5c Added GSocket motif (it compiles but I didn't tested it)
Changed wxSockFlags type (switched to int)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 17:24:25 +00:00
Ove Kaaven
54c13c66d2 Couple more Unicode fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:53:22 +00:00
Ove Kaaven
48a84964c6 Unicode fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:52:33 +00:00
Ove Kaaven
5701b057fb More _T() in asserts...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:51:31 +00:00
Ove Kaaven
ee6db21e41 Add more _T() in asserts...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:49:06 +00:00
Ove Kaaven
59bc036c03 Use memcmp instead of that wxString hack
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:48:39 +00:00
Karsten Ballüder
efee48a0f6 Fixed stupid new bugs :-(
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:48:31 +00:00
Ove Kaaven
6de9282600 Convert argv[] to Unicode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:48:04 +00:00
Ove Kaaven
b91b22004d Someone need to make the clientdata be void* instead of this char*
mess


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:43:48 +00:00
Ove Kaaven
aece0491ee Unicode fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:42:31 +00:00
Ove Kaaven
e7fc59f4a1 Couple of unicode fixes (the #if should be wxUSE_UNICODE, not wxUNICODE,
and there's no sense in allocating a wxWX2MBbuf of len 200 then assigning
a different buffer to it either)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:41:17 +00:00
Ove Kaaven
fc8525d7b0 Convert filenames unicode->ascii
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:38:52 +00:00
Ove Kaaven
e7b3d6babb Implementation of wxFopen, wxFreopen, wxStrftime
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:38:03 +00:00
Ove Kaaven
e385b3ff37 Add wxFopen, wxFreopen, wxStrftime
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:36:38 +00:00
Ove Kaaven
c1b03ce802 Let argv[] be wxChar**
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 09:36:03 +00:00
Vadim Zeitlin
45e41c05e4 1. corrected "notebook selection handling" event handler to work
2. added a page for bitmapped controls tests


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 00:56:51 +00:00
Vadim Zeitlin
5d1d2d465d 1. frames respect update region (Tom Surace patch)
2. bitmap buttons don't lose bitmaps
3. attempt to reduce number of simultaneously default buttons in a panel


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 00:53:45 +00:00
Vadim Zeitlin
c49245f8ba 1. added wxGetNumberFromUser (to textdlgg.cpp and dialogs sample)
2. wxTE_RICH style added to wxMSW, the text controls don't use RICHEDIT
   class by default any more
3. wxRadioBox doesn't generate button events any more (grrr...)
4. commented out code in log.cpp restored and a bug corrected


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-22 23:39:47 +00:00
Robert Roebling
953704c1c7 Corrected wxlistBox, wxRadioBox, wxComboBox and
wxChoice in that they do no longer send events
    after programmatic calls
  Corrected wxStaticBitmap
  Reimplemented wxRadioButton as per wxMSW
  Updated docs for the above
  Update testconf for socket changes
  Other minor fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-22 23:28:55 +00:00
Robert Roebling
1e7fd31108 New drawing test code.
Added distrib file for wxMSW.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-22 20:20:42 +00:00
Guilhem Lavaux
a324a7bccf Added GSocket for Unix (only GTK for the moment)
Updated wxSocket to use GSocket API
Added a progress bar to client.cpp
Added CopyTo to wxMemoryOutputStream to copy the internal buffer to a specified buffer.
Various changes/fixes to the high-level protocols FTP/HTTP
Various Unicode fixes
Removed sckint.*


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-22 17:51:54 +00:00
Robert Roebling
e4d18e7f60 Compile fix for *newest* mingw32
Switched default options for mingw32


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-22 15:10:43 +00:00
Robert Roebling
b62c3631c9 wxMenu compile fix
new drawing tests
  tree ctrl GCC compile fix (I hope)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-22 15:05:52 +00:00
Robin Dunn
619d05280a fixed font-matching bug in wxFontList::FindOrCreateFont for wxGTK when
font family is wxDEFAULT.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-22 07:34:57 +00:00
Harco de Hilster
5d55595cb6 Minor and silly fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 21:21:01 +00:00
Vadim Zeitlin
1fad4c3eb2 added demonstration of wxGTK wxStaticBitmap::SetBitmap() bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 18:49:00 +00:00
Harco de Hilster
214960fb6d Made cross compiling easier;
run configure --host=i586-mingw32 --build=i586-linux
, for example, to cross compile from linux to windows using
i586-mingw32-xxx binaries.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 18:45:25 +00:00
Karsten Ballüder
e41bbc80bc bug fix for m_parent == NULL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 18:13:27 +00:00
Robert Roebling
f92722960b Mini-fix for wxStaticBitmap
switched on reports after changing text ctrl be hand again


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 16:35:18 +00:00
Robert Roebling
6a570331df MingW32 compilation works now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 16:19:59 +00:00
Karsten Ballüder
63b522d64b more type-safety
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 16:13:27 +00:00
Vadim Zeitlin
ee31c392ac 1. Assorted Motif fixes
a) tear off menus
 b) native dialogs
 c) crash in ~wxWindow fixed
 d) compilation and linking fixes
2. test code removed from minimal sample, text one compiles without clipboard
3. wxAppBase/wxApp small fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 16:10:18 +00:00
Karsten Ballüder
20a8b34e2c remove duplicate deletion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 15:39:39 +00:00
Karsten Ballüder
d85eb7fcf8 added helpwxht.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 15:01:56 +00:00
Karsten Ballüder
8d18450524 Suppressed a spurious error message, now contents are looked for in entry
with help-id 0 and if not found a homemade list of contents is presented. :-)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 13:50:47 +00:00
Karsten Ballüder
c769f24816 fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 13:37:18 +00:00
Karsten Ballüder
8dd71e2b51 Much improved wxHelpControllerHtml, works under Solaris, too now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 13:32:08 +00:00
Václav Slavík
2508212677 imagemap support (html)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 11:06:27 +00:00
Václav Slavík
483ff5a5af fixed refresh bug in wxHtmlWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 09:59:47 +00:00
Vadim Zeitlin
a1665b22b0 1. panels pass focus to the next item in parent panel
2. warnings removed from iniconf.cpp and it's removed for Win32 compilation
3. wxWindow::PopupMenu(wxPoint) added, documented
4. Docs for wxTextCtrl explicitly mention that EVT_TEXT is triggered by
   programmatic updates too


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-20 23:22:30 +00:00
Harco de Hilster
22baaed33e some updates...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-20 22:38:12 +00:00
Harco de Hilster
934e1edaf4 little wxMenu ctor fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-20 20:35:30 +00:00
Harco de Hilster
ba7f542f6a Added lots of files. Enough now so that all wxHTML samples link.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-20 20:34:31 +00:00
Harco de Hilster
c637d46187 When building for/on a non-Unix platform, the --enable-dynlib check will only
issue a warning, not disable dynlib and odbc, since configure can't figure
it out anyway.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-20 20:33:42 +00:00
Robert Roebling
63aea43ffd Trying to compile samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-20 14:48:03 +00:00
Robert Roebling
2662e49e09 MingW32 compilation fixes all over
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-20 14:14:46 +00:00
Vadim Zeitlin
1ecffbff71 compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 22:54:55 +00:00
Vadim Zeitlin
b908d2244a wxMenu ctor made compatible again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 22:17:40 +00:00
Robin Dunn
910484a67d Fixed wxListCtrl::SetTextColour to set the RGB value instead of the
RBG value!  (Green and Blue were swapped...  I suppose if you are
colour blind it wouldn't matter much.)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 20:54:43 +00:00
Harco de Hilster
c7a800eadb forgot .bmp's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 18:29:35 +00:00
Guilhem Lavaux
0d63177885 Added StreamSize() to wxMemoryOutputStream.
Added InputStreamBuffer() and OutputStreamBuffer() to have access to
internal buffers.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 17:34:59 +00:00
Harco de Hilster
089989960f added extra #if case at the end for building using gnuwin and configure
(assuming that you're using a gnu flex prog)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 17:17:59 +00:00
Sylvain Bougnoux
8506d95db4 cosmetic, added some comment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 17:10:29 +00:00
Sylvain Bougnoux
0ae7f2a2e2 item with no image no longer crash when hit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 17:05:47 +00:00
Harco de Hilster
bcbc841d41 forgot wx.rc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 16:33:27 +00:00
Harco de Hilster
b09a4bb984 added .cur and .ico files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 16:32:11 +00:00
Harco de Hilster
ab5a0b5d33 added dcpsg.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 16:23:38 +00:00
Harco de Hilster
e6f1ad222c Moved bunch of #defines (LOG2DEV etc) from msw/dc.cpp to msw/dc.h
Small changes to dcpsg.cpp to make it compile for wxMSW


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 16:23:12 +00:00
Robert Roebling
112c5086e8 Updated testconf
Added dashed pens etc.
  Made tree ctrl sample crash..


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 14:41:30 +00:00
Harco de Hilster
510649e4d5 small fix for mingw32 compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 14:36:34 +00:00
Vadim Zeitlin
8b9c0e20ba typo corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 14:06:13 +00:00
Vadim Zeitlin
cc9efb9be7 even more fixes for nmake compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 13:17:13 +00:00
Karsten Ballüder
4d223b6704 Added test for vsscanf. GUESSING IS EVIL! Cannot test, my autoconf is too old.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 13:03:17 +00:00
Vadim Zeitlin
530e7fa307 regenaretd makefile from the latest template
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 12:55:02 +00:00
Vadim Zeitlin
4f84c635dc 1. compilation fix for wxHelpHtmlController (which shouldn't be compiled #if
!wxUSE_HTML)
2. some fixes to wxGrid


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 12:33:25 +00:00
Vadim Zeitlin
01bc089cd2 ifdef HAVE_VFORK => if HAVE_VFORK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 12:17:10 +00:00
Karsten Ballüder
b761fe4cfa typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 09:22:50 +00:00
Karsten Ballüder
baa9caff7e compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-19 09:22:37 +00:00
Vadim Zeitlin
73927f8bac Enter won't close dialog if [Ok] button is disabled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-18 21:48:31 +00:00
Karsten Ballüder
1d37e64400 more reasonable default size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-18 18:12:11 +00:00
Karsten Ballüder
29ea4a2908 Added wxHelpControllerHtml, derived from wxHtmlHelpControllerBase. API like
wxExtHelpController and fully backwards compatible with the "old" help
controller. Docs follow tomorrow. Modified sample to use it if wxHTML is
compiled in.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-18 18:09:46 +00:00
Harco de Hilster
bfcc7d7fd0 Now uses #define __WX_SETUP_H__ to signify that we're using configure
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-18 00:07:32 +00:00
Harco de Hilster
0c07f09eab Added statline to Makefile.am
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 22:41:40 +00:00
Harco de Hilster
25a2a4b05e added TODO list for cross compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 22:19:29 +00:00
Harco de Hilster
9e855852c1 Temp. fix for ..\..\zlib problem.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 22:08:14 +00:00
Harco de Hilster
678d9f2a42 Removed USING_CONFIGURE define. As VZ pointed out, checking HAVE_CONFIG_H
is enough to find out wether we're building with configure.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 21:53:06 +00:00
Harco de Hilster
0a2fe387aa Added notes on cross compiling Unix->Windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 19:05:34 +00:00
Harco de Hilster
bcb5057e60 ignore...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 18:22:17 +00:00
Harco de Hilster
b2cad68016 ignore these
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 18:21:41 +00:00
Harco de Hilster
bf86bd78cc mingw32/cygwin32 builds now automatically link against the most common win32 libraries.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 18:12:50 +00:00
Harco de Hilster
803a65290b Building wxMSW with configure now also properly installs the msw headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 17:33:16 +00:00
Harco de Hilster
77b497a04a minor fixes for mingw32 compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 16:30:03 +00:00
Harco de Hilster
3bb0b01c29 Minor fixes mainly to get stuff compiled using the mingw32 (cross) compiler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 16:27:26 +00:00
Harco de Hilster
4d19d97916 added mingw32 host platform to configure.in, added WINVER define for windows
builds, added USING_CONFIGURE define in acconfig.h and set wxUSE_UNIX default
to 0 (needed for cross-compiling and building on non-Unix-ported bash shells)
configure will of course set wxUSE_UNIX back to 1 by default.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-17 16:23:35 +00:00
Vadim Zeitlin
9b73db3c34 1. fixed Maximise() mismatch between wxFrame and wxMDIFrame
2. tried (unsuccessfully) to fix the warning in pnghand.cpp
3. fixes for VC and BCC makefiles generation with tmake (still untested)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-16 23:06:35 +00:00
Karsten Ballüder
de844935b6 removed obsolete flag
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-16 10:27:53 +00:00
Sylvain Bougnoux
87c13572ad check wxUSE_LIBJPEG
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-16 08:25:31 +00:00
Sylvain Bougnoux
622d090e8a flag use of multiple selection for MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-16 08:19:02 +00:00
Robin Dunn
5d9c28189e Preserve -1 for dilog unit conversions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 23:42:21 +00:00
Vadim Zeitlin
5e3dad49b0 made the sample work under wxMSW too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 23:38:57 +00:00
Vadim Zeitlin
b21624e7e0 some warnings suppressed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 23:34:18 +00:00
Vadim Zeitlin
b6a0d8a25b renamed controls.* to text.*
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 23:33:32 +00:00
Vadim Zeitlin
b07b29d788 the missing file for tmake (sorry)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 22:46:31 +00:00
Robert Roebling
d30e0edda8 Compile fixes,
corrected cursors (it isn't as simple as you think)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 19:26:04 +00:00
Robert Roebling
3b245d601a wxWindowDC now uses its window's font
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 18:13:21 +00:00
Guilhem Lavaux
c980c99263 * wxMemoryStreams updates
* Various fixes about wxGTK and Unicode
* Various fixes in wxStreams


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 18:08:57 +00:00
Robert Roebling
324dbfec39 Compile fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 17:30:33 +00:00
Vadim Zeitlin
d2e1ef1928 1. wxFFile::Close() buglet fixed
2. wxLogTextCtrl doesn't use streams any more


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 15:45:50 +00:00
Vadim Zeitlin
6a008b33c4 1. fixed makefile.vc for OLE files
2. fixed asserts in wxGTK::wxWindow::DoGetClientSize()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 14:08:30 +00:00
Vadim Zeitlin
0efe5ba76e 1. wxTextCtrl compilation fixes for wxGTK and more ugfixes (untested yet)
for wxMSW. Small doc update, too.
2. wxFFile compilation fixes for wxGTK
3. new files added to gtk/Makefile.am


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 13:42:27 +00:00
Sylvain Bougnoux
8b04a037d0 fixed SelectItem call with an invalid item
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-15 10:04:09 +00:00
Vadim Zeitlin
a1b82138ef 1. new wxFFile class - as wxFile but uses fopen/fread/fseek... instead of
open/read/seek...
2. wxTextCtrlBase appears, several bug fixes in MSW wxTextCtrl and made
   LoadFile() behave in the same way under GTK and MSW (fixed it for MSW
   too)
3. Corrected the sash position calculation in sashwin.cpp - seems to work
   now but I wonder how it could ever work before?
4. new, tmake generated, MSW makefiles. They probably don't work - will fix
   them as soon as people start complaining.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-14 22:55:57 +00:00
Vadim Zeitlin
f2071dda0b the template files for generating all MSW makefiles with tmake and the
(one and only one) file containing the list of all wxWindows sources.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-14 22:46:12 +00:00
J. Russell Smyth
52d802ebb8 Changed to use new wxWindow->Reparent call to allow build with current cvs
Added several small fixes from Scott Pleiter


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-14 17:31:42 +00:00
J. Russell Smyth
0e1ead0ef2 restoring makefiles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-14 17:24:41 +00:00
J. Russell Smyth
63e3daf4c7 restoring makefile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-14 17:19:59 +00:00
Robert Roebling
98d3fdbedd Removed bug that made wxWindow call OnPaint
twice and return wrog values for GetClientSize()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-14 15:36:37 +00:00
J. Russell Smyth
4705ee2dde Added wxHTML build to Makefile for VisualC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-13 21:59:59 +00:00
J. Russell Smyth
ddbde726d7 Added makefiles for VC++ for wxHTML samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-13 21:58:34 +00:00
J. Russell Smyth
ec4f5ef53d added precomp header stuf
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-13 20:22:12 +00:00
J. Russell Smyth
3364ab799a Added precompiled header support to allow building with VC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-13 18:24:29 +00:00
J. Russell Smyth
602e68af58 Removed default parameter setting for wxHtmlHelpControler::AddBook causing
VC++ to bomb compile


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-13 17:56:35 +00:00
Robert Roebling
7d6d2cd462 New attempt at getting constraints work
Removed horiz scrollbars from text ctrl
  Corrected client data deletion in combobox


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-13 13:46:31 +00:00
Guilhem Lavaux
940ddb190c * Changed char to wxChar in operators.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-13 06:27:42 +00:00
Guilhem Lavaux
b1830dfaba * Changed behaviour of wxTextStreams::operator(wxUint8/wxInt8). Now it writes
characters instead of numbers.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-12 17:17:43 +00:00
Vadim Zeitlin
bb69661b05 1. wxTextControl::SetFont() does something (good or bad - for you to judge)
2. tip dialog modified slightly to look a bit prettier under GTK
3. notebook test demonstrates the wxGTK radiobox-in-notebook-pages-constraints
bug


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-12 14:02:01 +00:00
Václav Slavík
a8b96c3dd8 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-12 13:24:59 +00:00
Václav Slavík
4e938f5b0b *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-12 13:17:41 +00:00
Vadim Zeitlin
f74ececa19 even more about setup0.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-12 07:59:18 +00:00
Vadim Zeitlin
c219cecc12 1. wxFrame doesn't show incorrect hints in the status bar for popup items
2. radio box handles wxSIZE_AUTO_WIDTH/HEIGHT correctly (finally!)
3. attempts to fix broken sash


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-11 22:08:17 +00:00
Robert Roebling
9146082cdf New global cursor behaviour.
Test for tear-off menus in controls sample.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-11 20:49:54 +00:00
Robert Roebling
56d7679d3e DocView and wxStream things
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-11 19:29:59 +00:00
Robert Roebling
d4c241b9e6 Updated testconf, fixed mistake in install.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-11 16:24:31 +00:00
Robert Roebling
d1af991f49 A few compile things.
Changed resizing of multi-line text ctrl.
  Augmented beta version to 8.
  Distribution things.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-11 15:56:57 +00:00
Vadim Zeitlin
e1f36ff823 wxButton::GetDefaultSize() added for MSW and documented
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-10 21:51:58 +00:00
Václav Slavík
704a4b7524 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-10 21:17:24 +00:00
Václav Slavík
42977f66f8 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-10 21:06:05 +00:00
Julian Smart
78bd7ed38c Added an #ifdef
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-10 20:05:30 +00:00
Brian Macy
e6f09be7da Ignore erase failures
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-10 16:52:10 +00:00
Julian Smart
f3c0f9e75f Added test for wxUSE_STATLINE in statline.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-10 13:31:14 +00:00
Václav Slavík
d78b3d6414 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-10 13:23:22 +00:00
Vadim Zeitlin
7cc98b3e3f 1. minor fixes in wxDynLib
2. added more symbols to winundef.h
3. fixed wxTextFile::IsOpen() - now it does what you'd suppose
4. listctrl now updates the item image when it changes
5. file dlg checks for an error and gives a message about it (debug only)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-10 00:50:16 +00:00
Harco de Hilster
e5b110b109 Installs Vasek's new generic headers (filesys.h, zipstream.h, wxhtml.h, etc)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-09 18:26:25 +00:00
Harco de Hilster
77133f2d9c Added Makefile.am in include/wx/html (needed for installation of header files)
Patched configure.in so that creates a Makefile there.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-09 18:00:56 +00:00
Guilhem Lavaux
c7d9131ae5 * wxStream doc update
* wxHTTP fix


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-09 17:10:49 +00:00
Patrick Albert
cc985face5 Some minors changes, like adding empty lines at end of files, to be able to compile with VC++1.52c.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-09 15:30:31 +00:00
Vadim Zeitlin
e3e717ecc5 added wxUSE_FS_INET/ZIP
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-09 14:32:50 +00:00
Karsten Ballüder
4ad3104559 Updated German and new Finnish translations.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-09 11:15:21 +00:00
Vadim Zeitlin
c94ad3c365 compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-08 13:28:31 +00:00
Václav Slavík
76ad75d316 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-07 22:05:00 +00:00
Václav Slavík
f8f81a2245 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-07 22:04:59 +00:00
Václav Slavík
5526e819ec *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-07 22:04:58 +00:00
Guilhem Lavaux
fae05df5a9 * New wxStreams (to be documented), new classes: wxBufferedStreams,
wxTextStreams


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-07 17:45:35 +00:00
Vadim Zeitlin
32d4bfd16c attempts to fix wxStaticBitmap::SetBitmap() - still doesn't work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-07 16:00:06 +00:00
Vadim Zeitlin
232806507b compilation fixes for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-07 15:11:09 +00:00
Karsten Ballüder
4e9865026f documented wxMENU_TEAROFF
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-07 09:24:55 +00:00
Karsten Ballüder
2b2edbedb4 Made tearoff menus work for gtk :-)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-07 09:18:34 +00:00
Vadim Zeitlin
094637f6d6 1. wxAppBase class appers, wxApp in wxGTK and wxMSW modified accordingly
(wxMotif not yet, but this change shouldn't break it)
2. GetStdIcon() small fixes
3. #pragma warning removed from dynlib.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-06 00:44:26 +00:00
Vadim Zeitlin
4092d6f221 CalcUnscrolledPosition takes int, not floats
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-05 21:09:00 +00:00
Vadim Zeitlin
ce9a75d225 made wxImage::Scale() const to not confuse people any more and added
a Rescale() which changes the image size "in place". Documented both
changes too.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-05 21:08:29 +00:00
Vadim Zeitlin
a0bc2c1d27 CalcUnscrolledPosition takes int, not floats
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-05 20:58:52 +00:00
Karsten Ballüder
ebea0891d0 Made icons configurable via a wxMApp virtual function. Tested on wxGTK only,
added it for all ports, though.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-05 11:22:45 +00:00
Vadim Zeitlin
13315b0cd3 some appearance fixes from Michael Bedward
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-04 20:48:05 +00:00
Robert Roebling
8dbf458911 Small changed to wxExtDialog
Made DnD use long instead of int
  Made DnD sample compile again
  Re-Updated wxTextDialog
  Added GetDefaultSize() to wxButton


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-04 13:50:13 +00:00
Vadim Zeitlin
ba059d80b4 wxList::SortFunc prototype corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-03 21:13:47 +00:00
Karsten Ballüder
752c7d6bbd Added wxDllLoader::UnloadLibrary()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-03 19:34:48 +00:00
Robert Roebling
329e86bfde Added wxExtDialog and sample.
Tried to make defs.h slightly more readable, also
    found some wrong flags then.
  Updated testconf.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-03 16:40:54 +00:00
Vadim Zeitlin
4438caf41a 1. DoSetSize() simplified, DoGetBestSize() introduced
2. code cleanup here and there
3. attempts to make static boxes behave better (i.e. stay below other controls)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-02 22:02:05 +00:00
Guilhem Lavaux
44719c473b * Typo.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-02 17:49:59 +00:00
Guilhem Lavaux
e03bcf0d40 * Fixed Apple IEEE conversion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-02 17:44:41 +00:00
Karsten Ballüder
eda61172d0 Minor improvement.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-02 15:52:54 +00:00
Karsten Ballüder
5724671379 Added demonstration of busy cursor bug.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-02 15:30:00 +00:00
Guilhem Lavaux
e93c800b85 * Changed %d by %u
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-01 17:38:01 +00:00
Robert Roebling
53daeadab7 Corrected bug in filedlg.
Added more stream tests to typetest sample.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-01 12:54:06 +00:00
Guilhem Lavaux
1e3eca9d37 * Moved ReadLine()/WriteLine() to wxIn/OutputStream
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-30 17:15:32 +00:00
Karsten Ballüder
f79fd1e54b fixed wrong assert
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-30 15:40:00 +00:00
Karsten Ballüder
88887175e6 Merged in from M.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-30 13:26:58 +00:00
Robin Dunn
9f0f2064a5 Now passes FILE* to wxExprDatabase instead of ofstream to compy with recent
changes in wxExprDatabase.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-30 08:30:45 +00:00
Robin Dunn
06d7fdef4b Corrected link error for missing wxRegTipProvider::GetTip by giving it
an empty stub function that can be filled in later when somebody
finishes this class.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-30 04:34:13 +00:00
Robin Dunn
9f04ccb1ab added some WXDLLEXPORT's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-30 04:28:29 +00:00
Robert Roebling
266084b5de Typos.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-30 00:03:20 +00:00
Robert Roebling
a533f5c122 wxChoiceDialog fix.
Distribution and build things.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-29 23:16:45 +00:00
Guilhem Lavaux
7b8bd8182c * wxDataStreams use wxUint now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-29 17:53:42 +00:00
Karsten Ballüder
0868079c33 Added code to look up main program symbols - unix only. PLEASE FIX FOR MSW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-29 17:04:57 +00:00
Vadim Zeitlin
bf6c2b3505 1. wxGrid fixes contributed by Gerhard Gruber (client data for cells...)
2. Motif warnings removed
3. Using native msgbox under Motif (ok, it doesn't work, but generic doesn't
   work neither)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-29 13:13:11 +00:00
Vadim Zeitlin
dfe1eee3bb my wxMotif fixes (merged with Robert's changes), wxMotif compiles, links
and runs... until you click in the menu, that is.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-29 12:34:18 +00:00
Vadim Zeitlin
a641505f0d startup tips for Unix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-29 11:50:30 +00:00
Unknown (UG)
7c0f3a1ebb no message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-29 08:41:07 +00:00
Vadim Zeitlin
c89165a82d more files I forgot to commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 22:08:46 +00:00
Vadim Zeitlin
c35414dbe4 misc minor fixes I forgot to commit before
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 22:06:24 +00:00
Vadim Zeitlin
6c582c35b9 should fix compilation for BC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 22:04:57 +00:00
Vadim Zeitlin
9f3a38fcd5 wxGTK compile fixes for my wxMSW changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 22:04:40 +00:00
Vadim Zeitlin
4e57b0d495 why cvs thinks that I modified these files?
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 21:53:29 +00:00
Vadim Zeitlin
e37feda245 file I forgot to add...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 21:52:13 +00:00
Vadim Zeitlin
367f2585a5 tip icon in XPM format
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 21:47:54 +00:00
Vadim Zeitlin
c50f1fb922 1. wxStaticLine implemented (generic (ugly) and MSW versions)
2. wxTextDialog looks fine under MSW again
3. startup tips added: code, sample, docs
4. read-only text controls don't participate in TAB traversal


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 21:39:49 +00:00
Guilhem Lavaux
b6bff3019e * wxStream fixes (integer/line parsing).
* Typetest sample fixes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 18:22:04 +00:00
Robert Roebling
c693edf3bc Applied fixes for AIX (GTK 1.0 compilation).
Removed ostream from property classes.
  Removed Lisp output from wxExpr.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 13:22:00 +00:00
Robin Dunn
64be695894 Final tweaks for 2.1b1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 04:08:58 +00:00
Robin Dunn
a08cbc0168 Final tweaks for 2.1b1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-28 03:10:35 +00:00
Robert Roebling
fd15d8f1b0 Replaced ostream with FILE* in wxExpr.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-27 22:37:41 +00:00
Vadim Zeitlin
4714ef79af missing newline at the end of file added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-27 22:06:33 +00:00
Robin Dunn
b456d57155 fixed typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-27 21:53:37 +00:00
Robert Roebling
e57e26dd03 More tests for streams.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-27 16:42:54 +00:00
Vadim Zeitlin
f776e250d9 missing semicolon added to the example
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-27 11:26:50 +00:00
Robert Roebling
3883022093 Work on streams of all sorts. More to come.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-27 10:39:38 +00:00
Vadim Zeitlin
abe2606b70 a small cosmetic fix for single choice dialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-26 13:55:18 +00:00
Robert Roebling
dff4a8684d Typos.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-26 12:10:30 +00:00
Robert Roebling
57dde4bd58 Added wxGTK-only cmn dialogs.
Fixed a few includes and installing makefiles.
  Updated testconf accordingly.

  Good fences make good neighbours.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-26 11:56:44 +00:00
Vadim Zeitlin
92049cd473 1. serious bug in wxRegConfig corrected - deleting a value would delete the
key containing it if it didn't have any subkeys (i.e. would delete the
   sibling values)
2. wxRegKey::GetFirstValue() starts with first value, not the second one
3. typo in wxStaticText::DoSetSize() which prevented width.AsIs() from
   working fixed
4. adjustment for the parent client area offset not done for the top level
   windows (dialogs and frames) any more


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-26 11:10:50 +00:00
Václav Slavík
4088592374 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-26 10:25:06 +00:00
Václav Slavík
00cd8a958f *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-26 10:12:18 +00:00
J. Russell Smyth
720dcba648 Added #include wx/dcclient.h for Vadims changes to work without pc headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-26 05:12:01 +00:00
J. Russell Smyth
f377a3b58c Added #include wx/dcclient.h and wx/settings.h for Vadims new code under
non-precomp header compilers


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-26 05:05:32 +00:00
J. Russell Smyth
3e45770ceb Added #include wx/listbox.h needed under Linux (probably all precomp header
systems)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-26 03:44:15 +00:00
Vadim Zeitlin
4b5d9823ec multi line static controls now calculate their width and height correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-25 22:50:54 +00:00
Robert Roebling
b134516c10 Commented out "best visual" code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-25 22:46:50 +00:00
Vadim Zeitlin
257bf51016 1. wxSingleChoiceDialog looks Ok under Windows
2. wxDialog now longer is resizeable by default
3. wxProgressDialog has a more reasonable width


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-25 21:28:25 +00:00
Karsten Ballüder
8736a9a0d3 fixed frame style
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-25 18:11:19 +00:00
Robert Roebling
faeaeff901 Oops.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-25 16:31:46 +00:00
Robert Roebling
58c7cd12b9 Changed a few true -> TRUE
added #ifdef GTK 1.2


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-25 16:30:47 +00:00
Václav Slavík
108a0f648f *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-25 14:04:56 +00:00
Karsten Ballüder
2d17a4e2f1 slightly more intelligent size calculation to prevent clipping of text
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-25 14:02:28 +00:00
Vadim Zeitlin
f81a662057 the progres dialog now looks decently under Windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-24 22:07:04 +00:00
Vadim Zeitlin
d1d7cdff87 wxSpinButton::GetValue() returns correct result now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-24 22:05:15 +00:00
Vadim Zeitlin
96d3780753 several notebook bugs fixed:
1. deleting the last page sets selection to -1
2. deleting the selected page unselects it first
3. adding page calls Layout() on it


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-24 21:27:52 +00:00
Robin Dunn
b1cf23dc26 Printout object is now calling base class virtuals where needed...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-24 20:02:25 +00:00
Robert Roebling
7b280524bb wxGTK now chooses the best visual X offers,
instead of the default one.
  Reordered object files for library creation.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-24 14:43:01 +00:00
Karsten Ballüder
9fff23f6cb Updated from Mahogany.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-24 09:04:18 +00:00
Vadim Zeitlin
b3818fbe8e MDI child maximize bug fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-23 23:31:20 +00:00
Robert Roebling
33caefb377 Motif things.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-23 19:33:49 +00:00
317 changed files with 207538 additions and 195 deletions

View File

@@ -1,57 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: tokenzr.h
// Purpose: String tokenizer
// Author: Guilhem Lavaux
// Modified by:
// Created: 04/22/98
// RCS-ID: $Id$
// Copyright: (c) Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TOKENZRH
#define _WX_TOKENZRH
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/object.h"
#include "wx/string.h"
#include "wx/filefn.h"
class WXDLLEXPORT wxStringTokenizer : public wxObject
{
public:
wxStringTokenizer(const wxString& to_tokenize,
const wxString& delims = " \t\r\n",
bool ret_delim = FALSE);
wxStringTokenizer() { m_retdelims = FALSE;}
virtual ~wxStringTokenizer();
int CountTokens() const;
bool HasMoreTokens();
wxString NextToken();
wxString GetNextToken() { return NextToken(); };
wxString GetString() const { return m_string; }
void SetString(const wxString& to_tokenize,
const wxString& delims = " \t\r\n",
bool ret_delim = FALSE)
{
m_string = to_tokenize;
m_delims = delims;
m_retdelims = ret_delim;
}
protected:
off_t FindDelims(const wxString& str, const wxString& delims) const;
void EatLeadingDelims();
wxString m_string, m_delims;
bool m_retdelims;
};
#endif // _WX_TOKENZRH

View File

@@ -1,138 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: tokenzr.cpp
// Purpose: String tokenizer
// Author: Guilhem Lavaux
// Modified by:
// Created: 04/22/98
// RCS-ID: $Id$
// Copyright: (c) Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "tokenzr.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/tokenzr.h"
wxStringTokenizer::wxStringTokenizer(const wxString& to_tokenize,
const wxString& delims,
bool ret_delims)
{
m_string = to_tokenize;
m_delims = delims;
m_retdelims = ret_delims;
}
wxStringTokenizer::~wxStringTokenizer()
{
}
off_t wxStringTokenizer::FindDelims(const wxString& str, const wxString& delims) const
{
for ( size_t i = 0; i < str.Length(); i++ )
{
wxChar c = str[i];
for ( size_t j = 0; j < delims.Length() ; j++ )
{
if ( delims[j] == c )
return i;
}
}
return -1;
}
int wxStringTokenizer::CountTokens() const
{
wxString p_string = m_string;
bool found = TRUE;
int pos, count = 1;
if (p_string.Length() == 0)
return 0;
while (found)
{
pos = FindDelims(p_string, m_delims);
if (pos != -1)
{
count++;
p_string = p_string(pos+1, p_string.Length());
}
else
{
found = FALSE;
}
}
return count;
}
bool wxStringTokenizer::HasMoreTokens()
{
return !m_string.IsEmpty();
}
// needed to fix leading whitespace / mult. delims bugs
void wxStringTokenizer::EatLeadingDelims()
{
int pos;
// while leading delims trim 'em from the left
while ( ( pos = FindDelims(m_string, m_delims)) == 0 )
{
m_string = m_string.Mid((size_t)1);
}
}
wxString wxStringTokenizer::NextToken()
{
off_t pos, pos2;
wxString r_string;
if ( m_string.IsEmpty() )
return m_string;
if ( !m_retdelims )
EatLeadingDelims();
pos = FindDelims(m_string, m_delims);
if (pos == -1)
{
r_string = m_string;
m_string = wxEmptyString;
return r_string;
}
if (m_retdelims)
{
if (!pos)
{
pos++;
pos2 = 1;
}
else
{
pos2 = pos;
}
}
else
{
pos2 = pos + 1;
}
r_string = m_string.Left((size_t)pos);
m_string = m_string.Mid((size_t)pos2);
return r_string;
}

117
utils/wxPython/.cvsignore Normal file
View File

@@ -0,0 +1,117 @@
*.py
*.pyc
*.pyc
*.pyd
*.pyd
*.pyo
*.pyo
*.zip
.cvsignore
.emacs.desktop
__init__.py
__init__.py
__init__.pyc
__init__.pyc
__init__.pyo
__init__.pyo
build.local
cmndlgs.py
cmndlgs.py
cmndlgs.pyc
cmndlgs.pyc
cmndlgs.pyo
cmndlgs.pyo
controls.py
controls.py
controls.pyc
controls.pyc
controls.pyo
controls.pyo
controls2.py
controls2.py
controls2.pyc
controls2.pyc
controls2.pyo
controls2.pyo
docs
events.py
events.py
events.pyc
events.pyc
events.pyo
events.pyo
filelist
frames.py
frames.py
frames.pyc
frames.pyc
frames.pyo
frames.pyo
gdi.py
gdi.py
gdi.pyc
gdi.pyc
gdi.pyo
gdi.pyo
glcanvas.py
glcanvas.pyc
glcanvasc.ilk
glcanvasc.pyd
image.py
image.pyc
mdi.py
mdi.py
mdi.pyc
mdi.pyc
mdi.pyo
mdi.pyo
misc.py
misc.py
misc.pyc
misc.pyc
misc.pyo
misc.pyo
printfw.py
stattool.py
stattool.py
stattool.pyc
stattool.pyc
stattool.pyo
stattool.pyo
utils.py
utils.py
utils.pyc
utils.pyc
utils.pyo
utilsc.ilk
utilsc.pyd
windows.py
windows.py
windows.pyc
windows.pyc
windows.pyo
windows.pyo
windows2.py
windows2.py
windows2.pyc
windows2.pyc
windows2.pyo
windows2.pyo
windows3.py
windows3.pyc
windows3.pyo
wx.py
wx.py
wx.pyc
wx.pyc
wx.pyo
wxPython.doc
wxc.ilk
wxc.pdb
wxc.pyd
wxp.py
wxp.pyc
wxp.pyo
wxpc.ilk
wxpc.pdb
wxpc.pyd

411
utils/wxPython/README.txt Normal file
View File

@@ -0,0 +1,411 @@
wxPython README
---------------
Welcome to the wonderful world of wxPython!
Once you have installed the wxPython extension module, you can try it
out by going to the [install dir]\wxPython\demo directory and typing:
python demo.py
There are also some other sample files there for you to play with and
learn from.
If you selected to install the documentation then point your browser
to [install dir]\wxPython\docs\index.htm and you will then be looking
at the docs for wxWindows. For the most part you can use the C++ docs
as most classes and methods are used identically. Where there are
differences they are documented with a "wxPython Note."
On Win32 systems the binary self-installer creates a program group on
the Start Menu that contains a link to running the demo and a link to
the help file. To help you save disk space I'm now using Microsoft's
HTML Help format. If your system doesn't know what to do with the help
file, you can install the HTML Help Viewer as part of IE 4+, NT
Service Pack 4+, or the HTML Workshop at
http://msdn.microsoft.com/workshop/author/htmlhelp/download.asp.
Getting Help
------------
Since wxPython is a blending of multiple technologies, help comes from
multiple sources. See the http://alldunn.com/wxPython for details on
various sources of help, but probably the best source is the
wxPython-users mail list. You can view the archive or subscribe by
going to
http://starship.python.net/mailman/listinfo/wxpython-users
Or you can send mail directly to the list using this address:
wxpython-users@starship.python.net
----------------------------------------------------------------------
What's new in 2.1b3
--------------------
This release is syncronized with release 2.1 snapshot 9 of wxWindows.
Switched to using SWIG from CVS (see http://swig.cs.uchicago.edu/cvs.html)
for some of the new features and such. Also they have encorporated my
patches so there is really no reason to stick with the current (very
old) release... This version of SWIG gives the following new
features:
1. Keyword arguments. You no longer have to specify all the
parameters with defaults to a method just to specify a
non-default value on the end. You can now do this instead:
win = wxWindow(parent, -1, style = mystyle)
2. There is now an an equivalence between Python's None and C++'s
NULL. This means that any methods that might return NULL will
now return None and you can use none where wxWindows might be
expecting NULL. This makes things much more snake-ish.
There is a new build system based on a new Python program instead of
raw makefiles. Now wxPython builds are virtually the same on MSW or
Unix systems. See the end of this file for new build instructions and
see distrib/build.py for more details.
wxDC.Bilt now includes the useMask parameter, and has been split into
two different versions. wxDC.BlitXY is like what was there before and
takes raw coordinants and sizes, and the new wxDC.Blit is for the new
interface using wxPoints and a wxSize.
What's new in 2.1b2
--------------------
Added the missing wxWindow.GetUpdateRegion() method.
Made a new change in SWIG (update your patches everybody) that
provides a fix for global shadow objects that get an exception in
their __del__ when their extension module has already been deleted.
It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
line 496 if you want to do it by hand.
It is now possible to run through MainLoop more than once in any one
process. The cleanup that used to happen as MainLoop completed (and
prevented it from running again) has been delayed until the wxc module
is being unloaded by Python.
I fixed a bunch of stuff in the C++ version of wxGrid so it wouldn't
make wxPython look bad.
wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added
wxWindow.PopupMenuXY to be consistent with some other methods.
Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.
You can now provide your own app.MainLoop method. See
wxPython/demo/demoMainLoop.py for an example and some explaination.
Got the in-place-edit for the wxTreeCtrl fixed and added some demo
code to show how to use it.
Put the wxIcon constructor back in for GTK as it now has one that
matches MSW's.
Added wxGrid.GetCells
Added wxSystemSettings static methods as functions with names like
wxSystemSettings_GetSystemColour.
Removed wxPyMenu since using menu callbacks have been depreciated in
wxWindows. Use wxMenu and events instead.
Added alternate wxBitmap constructor (for MSW only) as
wxBitmapFromData(data, type, width, height, depth = 1)
Added a helper function named wxPyTypeCast that can convert shadow
objects of one type into shadow objects of another type. (Like doing
a down-cast.) See the implementation in wx.py for some docs.
Fixed wxImage GetData and SetData to properly use String objects for
data transfer.
Added access methods to wxGridEvent.
New Makefile/Setup files supporting multiple dynamic extension modules
for unix systems.
Fixes for the wxGLCanvas demo to work around a strange bug in gtk.
SWIG support routines now compiled separately instead of being bundled
in wx.cpp.
What's new in 2.1b1
--------------------
Fixed wxComboBox.SetSelection so that it actually sets the selected
item. (Actually just removed it from wxPython and let it default to
wxChoice.SetSelection which was already doing the right thing.)
Added the Printing Framework.
Switched back to using the wxWindows DLL for the pre-built Win32
version. The problem was needing to reinitialize static class info
data after loading each extension module.
Lots of little tweaks and additions to reflect changes to various
wxWindows classes.
Fixed a bug with attaching objects to tree items. Actually was a
symptom of a larger problem with not obtaining the interpreter lock
when doing any Py_DECREFs.
wxSizer and friends. Sizers are layout tools that manage a colection
of windows and sizers. Different types of sizers apply different
types of layout algorithms. You saw it here first! These classes are
not even in the wxWindows C++ library yet!
What's new in 2.0b9
-------------------
Bug fix for ListCtrl in test4.py (Was a missing file... DSM!)
Bug fix for occassional GPF on Win32 systems upon termination of a
wxPython application.
Added wxListBox.GetSelections returning selections as a Tuple.
Added a wxTreeItemData that is able to hold any Python object and be
associated with items in a wxTreeCtrl. Added test pytree.py to show
this feature off.
Added wxSafeYield function.
OpenGL Canvas can be optionally compiled in to wxPython.
Awesome new Demo Framework for showing off wxPython and for learning
how it all works.
The pre-built Win32 version is no longer distributing the wxWindows
DLL. It is statically linked with the wxWindows library instead.
Added a couple missing items from the docs.
Added wxImage, wxImageHandler, wxPNGHandler, wxJPEGHandler,
wxGIFHandler and wxBMPHandler.
Added new methods to wxTextCtrl.
Fixed some problems with how SWIG was wrapping some wxTreeCtrl
methods.
What's new in 2.0b8
-------------------
Support for using Python threads in wxPython apps.
Several missing methods from various classes.
Various bug fixes.
What's new in 2.0b7
-------------------
Added DLG_PNT and DLG_SZE convienience methods to wxWindow class.
Added missing constructor and other methods for wxMenuItem.
What's new in 2.0b6
-------------------
Just a quickie update to fix the self-installer to be compatible with
Python 1.5.2b2's Registry settings.
What's new in 2.0b5
-------------------
Well obviously the numbering scheme has changed. I did this to
reflect the fact that this truly is the second major revision of
wxPython, (well the third actually if you count the one I did for
wxWindows 1.68 and then threw away...) and also that it is associated
with the 2.0 version of wxWindows.
I have finally started documenting wxPython. There are several pages
in the wxWindows documentation tree specifically about wxPython, and I
have added notes within the class references about where and how wxPython
diverges from wxWindows.
Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
window handle. If you can get the window handle into the python code,
it should just work... More news on this later.
Added wxImageList, wxToolTip.
Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
wxRegConfig class.
As usual, some bug fixes, tweaks, etc.
What's new in 0.5.3
-------------------
Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
Various cleanup, tweaks, minor additions, etc. to maintain
compatibility with the current wxWindows.
What's new in 0.5.0
-------------------
Changed the import semantics from "from wxPython import *" to "from
wxPython.wx import *" This is for people who are worried about
namespace pollution, they can use "from wxPython import wx" and then
prefix all the wxPython identifiers with "wx."
Added wxTaskbarIcon for wxMSW.
Made the events work for wxGrid.
Added wxConfig.
Added wxMiniFrame for wxGTK.
Changed many of the args and return values that were pointers to gdi
objects to references to reflect changes in the wxWindows API.
Other assorted fixes and additions.
What's new in 0.4.2
-------------------
wxPython on wxGTK works!!! Both dynamic and static on Linux and
static on Solaris have been tested. Many thanks go to Harm
<H.v.d.Heijden@phys.tue.nl> for his astute detective work on tracking
down a nasty DECREF bug. Okay so I have to confess that it was just a
DSM (Dumb Stupid Mistake) on my part but it was nasty none the less
because the behavior was so different on different platforms.
The dynamicly loaded module on Solaris is still segfaulting, so it
must have been a different issue all along...
What's New in 0.4
-----------------
1. Worked on wxGTK compatibility. It is partially working. On a
Solaris/Sparc box wxPython is working but only when it is statically
linked with the Python interpreter. When built as a dyamically loaded
extension module, things start acting weirdly and it soon seg-faults.
And on Linux both the statically linked and the dynamically linked
version segfault shortly after starting up.
2. Added Toolbar, StatusBar and SplitterWindow classes.
3. Varioius bug fixes, enhancements, etc.
----------------------------------------------------------------------
Build Instructions
------------------
I used SWIG (http://www.swig.org) to create the source code for the
extension module. This enabled me to only have to deal with a small
amount of code and only have to bother with the exceptional issues.
SWIG takes care of the rest and generates all the repetative code for
me. You don't need SWIG to build the extension module as all the
generated C++ code is included under the src directory.
I added a few minor features to SWIG to control some of the code
generation. If you want to play around with this you will need to get
a recent version of SWIG from their CVS or from a daily build. See
http://www.swig.org/ for details.
wxPython is organized as a Python package. This means that the
directory containing the results of the build process should be a
subdirectory of a directory on the PYTHONPATH. (And preferably should
be named wxPython.) You can control where the build process will dump
wxPython by setting the TARGETDIR variable for the build utility, (see
below.)
1. Build wxWindows as described in its BuildCVS.txt file. For *nix
systems I run configure with these flags:
--with-gtk
--with-libjpeg
--without-odbc
--enable-unicode=no
--enable-threads=yes
--enable-socket=yes
--enable-static=no
--enable-shared=yes
--disable-std_iostreams
You can use whatever flags you want, but I know these work.
For Win32 systems I use Visual C++ 6.0, but 5.0 should work. The
build utility currently does not support any other win32 compilers.
2. At this point you may want to make an alias or symlink, script,
batch file, whatever on the PATH that invokes
$(WXWIN)/utils/wxPython/distrib/build.py to help simplify matters
somewhat. For example, on my win32 system I have a file named
build.bat in a directory on the PATH that contains:
python $(WXWIN)/utils/wxPython/distrib/build.py %1 %2 %3 %4 %5 %6
3. Change into the $(WXWIN)/utils/wxPython/src directory.
4. Type "build -b" to build wxPython and "build -i" to install it.
The build.py script actually generates a Makefile based on what it
finds on your system and information found in the build.cfg file.
If you have troubles building or you want it built or installed in
a different way, take a look at the docstring in build.py. You may
be able to override configuration options in a file named
build.local.
5. To build and install the add-on modules, change to the appropriate
directory under $(WXWIN)/utils/wxPython/modules and run the build
utility again.
6. Change to the $(WXWIN)/utils/wxPython/demo directory.
7. Try executing the demo program. For example:
python demo.py
To run it without requiring a console on win32, you can use the
pythonw.exe version of Python either from the command line or from a
shortcut.
----------------
Robin Dunn
robin@alldunn.com

View File

@@ -0,0 +1,139 @@
*** swig.h.old Wed Feb 04 15:59:40 1998
--- swig.h Fri Aug 28 15:46:32 1998
***************
*** 178,185 ****
--- 178,211 ----
char *firstkey();
char *nextkey();
};
+ // -------------------------------------------------------------------
+ // Simple Vector class
+ // User is responsible for deleting contents before deleteing Vector
+ // -------------------------------------------------------------------
+
+ class Vector {
+ public:
+ Vector(size_t allocSize=8);
+ ~Vector();
+
+ size_t size() { return m_size; }
+ size_t count() { return m_count; }
+ size_t append(void* object);
+ size_t extend(size_t newSize);
+
+ void*& operator[] (size_t idx);
+
+ static void* s_nullPtr;
+
+ private:
+ size_t m_size;
+ size_t m_count;
+ void** m_data;
+ };
+
+
/************************************************************************
* class DataType
*
* Defines the basic datatypes supported by the translator.
***************
*** 684,691 ****
--- 710,761 ----
extern char *name_get(char *vname, int suppress=0);
extern char *name_set(char *vname, int suppress=0);
extern char *name_construct(char *classname, int suppress=0);
extern char *name_destroy(char *classname, int suppress=0);
+
+ // ----------------------------------------------------------------------
+ // class CPP_class
+ //
+ // Class for managing class members (internally)
+ // ----------------------------------------------------------------------
+
+ class CPP_member;
+
+ class CPP_class {
+ public:
+ char *classname; // Real class name
+ char *classrename; // New name of class (if applicable)
+ char *classtype; // class type (struct, union, class)
+ int strip; // Strip off class declarator
+ int wextern; // Value of extern wrapper variable for this class
+ int have_constructor; // Status bit indicating if we've seen a constructor
+ int have_destructor; // Status bit indicating if a destructor has been seen
+ int is_abstract; // Status bit indicating if this is an abstract class
+ int generate_default; // Generate default constructors
+ int objective_c; // Set if this is an objective C class
+ int error; // Set if this class can't be generated
+ int line; // Line number
+ char **baseclass; // Base classes (if any)
+ Hash *local; // Hash table for local types
+ Hash *scope; // Local scope hash table
+ DocEntry *de; // Documentation entry of class
+ CPP_member *members; // Linked list of members
+ CPP_class *next; // Next class
+ static CPP_class *classlist; // List of all classes stored
+
+ Vector addPragmas;
+
+ CPP_class(char *name, char *ctype);
+ void add_member(CPP_member *m);
+ CPP_member *search_member(char *name);
+ void inherit_decls(int mode);
+ void emit_decls();
+ static CPP_class *search(char *name);
+ void create_default();
+ static void create_all();
+ };
+
+ extern CPP_class *current_class;
/***********************************************************************
* -- Revision History
* $Log$
* Revision 1.2 1999/07/31 07:54:05 RD
* wxPython 2.1b1:
*
* Added the missing wxWindow.GetUpdateRegion() method.
*
* Made a new change in SWIG (update your patches everybody) that
* provides a fix for global shadow objects that get an exception in
* their __del__ when their extension module has already been deleted.
* It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
* line 496 if you want to do it by hand.
*
* It is now possible to run through MainLoop more than once in any one
* process. The cleanup that used to happen as MainLoop completed (and
* prevented it from running again) has been delayed until the wxc module
* is being unloaded by Python.
*
* wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added
* wxWindow.PopupMenuXY to be consistent with some other methods.
*
* Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.
*
* You can now provide your own app.MainLoop method. See
* wxPython/demo/demoMainLoop.py for an example and some explaination.
*
* Got the in-place-edit for the wxTreeCtrl fixed and added some demo
* code to show how to use it.
*
* Put the wxIcon constructor back in for GTK as it now has one that
* matches MSW's.
*
* Added wxGrid.GetCells
*
* Added wxSystemSettings static methods as functions with names like
* wxSystemSettings_GetSystemColour.
*
* Removed wxPyMenu since using menu callbacks have been depreciated in
* wxWindows. Use wxMenu and events instead.
*
* Added alternate wxBitmap constructor (for MSW only) as
* wxBitmapFromData(data, type, width, height, depth = 1)
*
* Added a helper function named wxPyTypeCast that can convert shadow
* objects of one type into shadow objects of another type. (Like doing
* a down-cast.) See the implementation in wx.py for some docs.
*

View File

@@ -0,0 +1,202 @@
*** python.cxx.old Fri Jan 02 23:17:40 1998
--- python.cxx Fri Aug 28 15:49:18 1998
***************
*** 1678,1685 ****
--- 1678,1702 ----
fprintf(stderr,"%s : Line %d. Unable to locate file %s\n", input_file, line_number, value);
}
}
}
+ } else if (strcmp(cmd, "addtomethod") == 0) {
+ // parse value, expected to be in the form "methodName:line"
+ char* txtptr = strchr(value, ':');
+ if (txtptr) {
+ // add name and line to a list in current_class
+ *txtptr = 0;
+ txtptr++;
+ AddPragmaData* apData = new AddPragmaData(value, txtptr);
+ current_class->addPragmas.append(apData);
+
+ } else {
+ fprintf(stderr,"%s : Line %d. Malformed addtomethod pragma. Should be \"methodName:text\"\n",
+ input_file, line_number);
+ }
+ } else if (strcmp(cmd, "addtoclass") == 0) {
+ AddPragmaData* apData = new AddPragmaData("__class__", value);
+ current_class->addPragmas.append(apData);
} else {
fprintf(stderr,"%s : Line %d. Unrecognized pragma.\n", input_file, line_number);
}
}
*** python.h.old Thu Jul 24 23:18:50 1997
--- python.h Fri Aug 28 15:46:08 1998
***************
*** 184,191 ****
--- 184,203 ----
void cpp_declare_const(char *name, char *iname, DataType *type, char *value);
void cpp_class_decl(char *, char *,char *);
void pragma(char *, char *, char *);
void add_typedef(DataType *t, char *name);
+
+ void emitAddPragmas(String& output, char* name, char* spacing);
};
#define PYSHADOW_MEMBER 0x2
+
+ struct AddPragmaData {
+ String m_method;
+ String m_text;
+
+ AddPragmaData(char* method, char* text)
+ : m_method(method),
+ m_text(text)
+ {}
+ };
*** pycpp.cxx.old Fri Jan 02 21:23:22 1998
--- pycpp.cxx Tue Jul 20 14:34:36 1999
***************
*** 275,282 ****
--- 275,283 ----
#endif
}
}
// if ((t->type != T_VOID) || (t->is_pointer))
+ emitAddPragmas(*pyclass, realname, tab8);
*pyclass << tab8 << "return val\n";
// Change the usage string to reflect our shadow class
***************
*** 393,400 ****
--- 394,402 ----
}
}
*construct << ")\n";
*construct << tab8 << "self.thisown = 1\n";
+ emitAddPragmas(*construct, "__init__", tab8);
have_constructor = 1;
} else {
// Hmmm. We seem to be creating a different constructor. We're just going to create a
***************
*** 490,503 ****
if (class_renamed) realname = class_name;
else realname = name;
}
! *pyclass << tab4 << "def __del__(self):\n"
<< tab8 << "if self.thisown == 1 :\n"
<< tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n";
!
have_destructor = 1;
-
if (doc_entry) {
doc_entry->usage = "";
doc_entry->usage << "del this";
}
--- 492,504 ----
if (class_renamed) realname = class_name;
else realname = name;
}
! *pyclass << tab4 << "def __del__(self, " << module << "=" << module << "):\n"
<< tab8 << "if self.thisown == 1 :\n"
<< tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n";
! emitAddPragmas(*pyclass, "__del__", tab8);
have_destructor = 1;
if (doc_entry) {
doc_entry->usage = "";
doc_entry->usage << "del this";
}
***************
*** 551,558 ****
--- 552,561 ----
repr << tab4 << "def __repr__(self):\n"
<< tab8 << "return \"<C " << class_name <<" instance>\"\n";
classes << repr;
+ emitAddPragmas(classes, "__class__", tab4);
+
}
// Now build the real class with a normal constructor
***************
*** 746,753 ****
--- 749,778 ----
hash.add(name,copy_string((char *) hash.lookup(t->name)));
}
}
+ // --------------------------------------------------------------------------------
+ // PYTHON::emitAddPragmas(String& output, char* name, char* spacing);
+ //
+ // Search the current_class->addPragmas vector for any text belonging to name.
+ // Append the text properly spcaed to the output string.
+ //
+ // --------------------------------------------------------------------------------
+
+ void PYTHON::emitAddPragmas(String& output, char* name, char* spacing)
+ {
+ AddPragmaData* apData;
+ size_t count;
+ int i;
+
+ count = current_class->addPragmas.count();
+ for (i=0; i<count; i++) {
+ apData = (AddPragmaData*)current_class->addPragmas[i];
+ if (strcmp(apData->m_method, name) == 0) {
+ output << spacing << apData->m_text << "\n";
+ }
+ }
+ }
/*********************************************************************************
*
* $Log$
* Revision 1.2 1999/07/31 07:54:05 RD
* wxPython 2.1b1:
*
* Added the missing wxWindow.GetUpdateRegion() method.
*
* Made a new change in SWIG (update your patches everybody) that
* provides a fix for global shadow objects that get an exception in
* their __del__ when their extension module has already been deleted.
* It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
* line 496 if you want to do it by hand.
*
* It is now possible to run through MainLoop more than once in any one
* process. The cleanup that used to happen as MainLoop completed (and
* prevented it from running again) has been delayed until the wxc module
* is being unloaded by Python.
*
* wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added
* wxWindow.PopupMenuXY to be consistent with some other methods.
*
* Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.
*
* You can now provide your own app.MainLoop method. See
* wxPython/demo/demoMainLoop.py for an example and some explaination.
*
* Got the in-place-edit for the wxTreeCtrl fixed and added some demo
* code to show how to use it.
*
* Put the wxIcon constructor back in for GTK as it now has one that
* matches MSW's.
*
* Added wxGrid.GetCells
*
* Added wxSystemSettings static methods as functions with names like
* wxSystemSettings_GetSystemColour.
*
* Removed wxPyMenu since using menu callbacks have been depreciated in
* wxWindows. Use wxMenu and events instead.
*
* Added alternate wxBitmap constructor (for MSW only) as
* wxBitmapFromData(data, type, width, height, depth = 1)
*
* Added a helper function named wxPyTypeCast that can convert shadow
* objects of one type into shadow objects of another type. (Like doing
* a down-cast.) See the implementation in wx.py for some docs.
*

View File

@@ -0,0 +1,530 @@
*** cplus.cxx.old Mon Feb 02 15:55:42 1998
--- cplus.cxx Fri Aug 28 13:02:50 1998
***************
*** 581,612 ****
// Class for managing class members (internally)
// ----------------------------------------------------------------------
static char *inherit_base_class = 0;
- class CPP_class {
- public:
- char *classname; // Real class name
- char *classrename; // New name of class (if applicable)
- char *classtype; // class type (struct, union, class)
- int strip; // Strip off class declarator
- int wextern; // Value of extern wrapper variable for this class
- int have_constructor; // Status bit indicating if we've seen a constructor
- int have_destructor; // Status bit indicating if a destructor has been seen
- int is_abstract; // Status bit indicating if this is an abstract class
- int generate_default; // Generate default constructors
- int objective_c; // Set if this is an objective C class
- int error; // Set if this class can't be generated
- int line; // Line number
- char **baseclass; // Base classes (if any)
- Hash *local; // Hash table for local types
- Hash *scope; // Local scope hash table
- DocEntry *de; // Documentation entry of class
- CPP_member *members; // Linked list of members
- CPP_class *next; // Next class
- static CPP_class *classlist; // List of all classes stored
! CPP_class(char *name, char *ctype) {
CPP_class *c;
classname = copy_string(name);
classtype = copy_string(ctype);
classrename = 0;
--- 581,593 ----
// Class for managing class members (internally)
// ----------------------------------------------------------------------
static char *inherit_base_class = 0;
+ CPP_class *CPP_class::classlist = 0;
+ CPP_class *current_class;
! CPP_class::CPP_class(char *name, char *ctype) {
CPP_class *c;
classname = copy_string(name);
classtype = copy_string(ctype);
classrename = 0;
***************
*** 642,650 ****
// ------------------------------------------------------------------------------
// Add a new C++ member to this class
// ------------------------------------------------------------------------------
! void add_member(CPP_member *m) {
CPP_member *cm;
// Set base class where this was defined
if (inherit_base_class)
--- 623,631 ----
// ------------------------------------------------------------------------------
// Add a new C++ member to this class
// ------------------------------------------------------------------------------
! void CPP_class::add_member(CPP_member *m) {
CPP_member *cm;
// Set base class where this was defined
if (inherit_base_class)
***************
*** 664,672 ****
// ------------------------------------------------------------------------------
// Search for a member with the given name. Returns the member on success, 0 on failure
// ------------------------------------------------------------------------------
! CPP_member *search_member(char *name) {
CPP_member *m;
char *c;
m = members;
while (m) {
--- 645,653 ----
// ------------------------------------------------------------------------------
// Search for a member with the given name. Returns the member on success, 0 on failure
// ------------------------------------------------------------------------------
! CPP_member *CPP_class::search_member(char *name) {
CPP_member *m;
char *c;
m = members;
while (m) {
***************
*** 680,688 ****
// ------------------------------------------------------------------------------
// Inherit. Put all the declarations associated with this class into the current
// ------------------------------------------------------------------------------
! void inherit_decls(int mode) {
CPP_member *m;
m = members;
while (m) {
inherit_base_class = m->base;
--- 661,669 ----
// ------------------------------------------------------------------------------
// Inherit. Put all the declarations associated with this class into the current
// ------------------------------------------------------------------------------
! void CPP_class::inherit_decls(int mode) {
CPP_member *m;
m = members;
while (m) {
inherit_base_class = m->base;
***************
*** 696,704 ****
// ------------------------------------------------------------------------------
// Emit all of the declarations associated with this class
// ------------------------------------------------------------------------------
! void emit_decls() {
CPP_member *m = members;
int last_scope = name_scope(0);
abstract = is_abstract;
while (m) {
--- 677,685 ----
// ------------------------------------------------------------------------------
// Emit all of the declarations associated with this class
// ------------------------------------------------------------------------------
! void CPP_class::emit_decls() {
CPP_member *m = members;
int last_scope = name_scope(0);
abstract = is_abstract;
while (m) {
***************
*** 713,721 ****
// ------------------------------------------------------------------------------
// Search for a given class in the list
// ------------------------------------------------------------------------------
! static CPP_class *search(char *name) {
CPP_class *c;
c = classlist;
if (!name) return 0;
while (c) {
--- 694,702 ----
// ------------------------------------------------------------------------------
// Search for a given class in the list
// ------------------------------------------------------------------------------
! CPP_class *CPP_class::search(char *name) {
CPP_class *c;
c = classlist;
if (!name) return 0;
while (c) {
***************
*** 729,737 ****
// Add default constructors and destructors
//
// ------------------------------------------------------------------------------
! void create_default() {
if (!generate_default) return;
// Try to generate a constructor if not available.
--- 710,718 ----
// Add default constructors and destructors
//
// ------------------------------------------------------------------------------
! void CPP_class::create_default() {
if (!generate_default) return;
// Try to generate a constructor if not available.
***************
*** 751,764 ****
// ------------------------------------------------------------------------------
// Dump *all* of the classes saved out to the various
// language modules (this does what cplus_close_class used to do)
// ------------------------------------------------------------------------------
- static void create_all();
- };
-
- CPP_class *CPP_class::classlist = 0;
- static CPP_class *current_class;
-
void CPP_class::create_all() {
CPP_class *c;
c = classlist;
while (c) {
--- 732,739 ----
*** vector.cxx.old Fri Aug 28 15:23:16 1998
--- vector.cxx Fri Aug 28 15:46:52 1998
***************
*** 0 ****
--- 1,182 ----
+
+ /*******************************************************************************
+ * Simplified Wrapper and Interface Generator (SWIG)
+ *
+ * Dave Beazley
+ *
+ * Department of Computer Science Theoretical Division (T-11)
+ * University of Utah Los Alamos National Laboratory
+ * Salt Lake City, Utah 84112 Los Alamos, New Mexico 87545
+ * beazley@cs.utah.edu beazley@lanl.gov
+ *
+ * Copyright (c) 1995-1997
+ * The University of Utah and the Regents of the University of California
+ * All Rights Reserved
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that
+ * (1) The above copyright notice and the following two paragraphs
+ * appear in all copies of the source code and (2) redistributions
+ * including binaries reproduces these notices in the supporting
+ * documentation. Substantial modifications to this software may be
+ * copyrighted by their authors and need not follow the licensing terms
+ * described here, provided that the new terms are clearly indicated in
+ * all files where they apply.
+ *
+ * IN NO EVENT SHALL THE AUTHOR, THE UNIVERSITY OF CALIFORNIA, THE
+ * UNIVERSITY OF UTAH OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY
+ * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
+ * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
+ * EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * THE AUTHOR, THE UNIVERSITY OF CALIFORNIA, AND THE UNIVERSITY OF UTAH
+ * SPECIFICALLY DISCLAIM ANY WARRANTIES,INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
+ * THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE,
+ * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ *******************************************************************************/
+
+ #include "internal.h"
+
+ /*******************************************************************************
+ * $Header$
+ *
+ * File : vector.cxx
+ *
+ * A very simple Vector class. Allways assumes that memory allocations are
+ * successful. Should be made more robust...
+ *
+ *******************************************************************************/
+
+ void* Vector::s_nullPtr = NULL;
+
+ // -----------------------------------------------------------------------------
+ // Vector::Vector(size_t allocSize = 8)
+ //
+ // Constructor. Creates a new Vector.
+ //
+ // Inputs : initial allocation size (optional)
+ //
+ // Output : New Vector object.
+ //
+ // Side Effects : None
+ // -----------------------------------------------------------------------------
+
+ Vector::Vector(size_t allocSize)
+ : m_size(allocSize),
+ m_count(0),
+ m_data(0)
+ {
+ if (m_size) {
+ m_data = new void*[m_size];
+ int i;
+ for (i=0; i<m_size;i++)
+ m_data[i] = 0;
+ }
+ }
+
+
+ // -----------------------------------------------------------------------------
+ // Vector::~Vector
+ //
+ // Destructor. Only cleans up the vector, not its contents!
+ //
+ // -----------------------------------------------------------------------------
+
+
+ Vector::~Vector() {
+ if (m_data) {
+ delete [] m_data;
+ }
+
+ m_data = 0;
+ m_size = m_count = 0;
+ }
+
+
+
+ // -----------------------------------------------------------------------------
+ // size_t Vector::extend(size_t newSize)
+ //
+ // Extends the vector to at least newSize length. Won't do anything if newSize
+ // is smaller than the current size of the vector.
+ //
+ // Returns the new allocated size.
+ //
+ // -----------------------------------------------------------------------------
+
+ #define GRANULARITY 16
+
+ size_t Vector::extend(size_t newSize) {
+
+ if (newSize > m_size) {
+ newSize = newSize + (GRANULARITY - (newSize % GRANULARITY));
+
+ void** temp = new void*[newSize];
+ memcpy(temp, m_data, m_size*sizeof(void*));
+
+ int i;
+ for (i=m_size; i<newSize; i++)
+ temp[i] = 0;
+
+ delete [] m_data;
+ m_data = temp;
+ m_size = newSize;
+ }
+ return m_size;
+ }
+
+
+ // -----------------------------------------------------------------------------
+ // Vector::append(void* object)
+ //
+ // Appends the object pointer to vector at index m_count. Increments m_count.
+ // Returns the new count.
+ // -----------------------------------------------------------------------------
+
+ size_t Vector::append(void* object) {
+ if (m_count >= m_size) {
+ extend(m_count + 1);
+ }
+
+ m_data[m_count] = object;
+ m_count += 1;
+
+ return m_count;
+ }
+
+
+ // -----------------------------------------------------------------------------
+ // Vector::operator[] (size_t idx)
+ //
+ // Returns a reference to the void pointer at idx. If idx is beyond the range
+ // of the vector, returns a reference to s_nullPtr.
+ //
+ // -----------------------------------------------------------------------------
+
+ void*& Vector::operator[] (size_t idx) {
+ if (idx >= m_size) {
+ s_nullPtr = 0;
+ return s_nullPtr;
+ }
+
+ return m_data[idx];
+ }
+
+
+ /***********************************************************************
+ *
+ * -- Revision History
+ * $Log$
+ * Revision 1.3 1999/07/31 07:54:05 RD
+ * wxPython 2.1b1:
+ *
+ * Added the missing wxWindow.GetUpdateRegion() method.
+ *
+ * Made a new change in SWIG (update your patches everybody) that
+ * provides a fix for global shadow objects that get an exception in
+ * their __del__ when their extension module has already been deleted.
+ * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
+ * line 496 if you want to do it by hand.
+ *
+ * It is now possible to run through MainLoop more than once in any one
+ * process. The cleanup that used to happen as MainLoop completed (and
+ * prevented it from running again) has been delayed until the wxc module
+ * is being unloaded by Python.
+ *
+ * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added
+ * wxWindow.PopupMenuXY to be consistent with some other methods.
+ *
+ * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace.
+ *
+ * You can now provide your own app.MainLoop method. See
+ * wxPython/demo/demoMainLoop.py for an example and some explaination.
+ *
+ * Got the in-place-edit for the wxTreeCtrl fixed and added some demo
+ * code to show how to use it.
+ *
+ * Put the wxIcon constructor back in for GTK as it now has one that
+ * matches MSW's.
+ *
+ * Added wxGrid.GetCells
+ *
+ * Added wxSystemSettings static methods as functions with names like
+ * wxSystemSettings_GetSystemColour.
+ *
+ * Removed wxPyMenu since using menu callbacks have been depreciated in
+ * wxWindows. Use wxMenu and events instead.
+ *
+ * Added alternate wxBitmap constructor (for MSW only) as
+ * wxBitmapFromData(data, type, width, height, depth = 1)
+ *
+ * Added a helper function named wxPyTypeCast that can convert shadow
+ * objects of one type into shadow objects of another type. (Like doing
+ * a down-cast.) See the implementation in wx.py for some docs.
+ *
+ *
+ ***********************************************************************/
+
+
+
+
+
+
*** makefile.msc.old Mon Jun 23 16:15:32 1997
--- makefile.msc Fri Aug 28 11:21:58 1998
***************
*** 33,50 ****
# Normally, you shouldn't have to change anything below this point #
########################################################################
LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj emit.obj newdoc.obj ascii.obj \
! html.obj latex.obj cplus.obj lang.obj hash.obj sstring.obj wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \
sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
LIBNAME = ..\libswig.lib
INCLUDE = -I../Include -I$(STD_INC)
! CFLAGS = -Zi -nologo -DSWIG_LIB="\"$(SWIG_LIB)\"" -DSWIG_CC="\"$(CC)\"" -DMSDOS -DSTDC_HEADERS=1 -DHAVE_LIBDL=1 $(SWIG_OPTS)
LD_FLAGS = -VERBOSE
#
--- 33,50 ----
# Normally, you shouldn't have to change anything below this point #
########################################################################
LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj emit.obj newdoc.obj ascii.obj \
! html.obj latex.obj cplus.obj lang.obj hash.obj vector.obj sstring.obj wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx vector.cxx \
sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
LIBNAME = ..\libswig.lib
INCLUDE = -I../Include -I$(STD_INC)
! CFLAGS = -Zi -nologo -DSWIG_LIB="\"$(SWIG_LIB)\"" -DSWIG_CC="\"$(CC)\"" -DMSDOS -DSTDC_HEADERS=1 -DHAVE_LIBDL=1 $(SWIG_OPTS) $(OTHERFLAGS)
LD_FLAGS = -VERBOSE
#
*** makefile.bc.old Sun Jan 04 13:49:24 1998
--- makefile.bc Fri Aug 28 15:42:58 1998
***************
*** 34,47 ****
########################################################################
LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj \
emit.obj newdoc.obj ascii.obj \
! html.obj latex.obj cplus.obj lang.obj hash.obj sstring.obj \
wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx \
emit.cxx newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \
! sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
LIBNAME = ..\libswig.lib
INCLUDE = -I../Include -I$(STD_INC)
--- 34,47 ----
########################################################################
LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj \
emit.obj newdoc.obj ascii.obj \
! html.obj latex.obj cplus.obj lang.obj hash.obj vector.obj sstring.obj \
wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx \
emit.cxx newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \
! vector.cxx sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
LIBNAME = ..\libswig.lib
INCLUDE = -I../Include -I$(STD_INC)
*** Makefile.in.old Wed May 28 23:56:56 1997
--- Makefile.in Fri Aug 28 15:43:36 1998
***************
*** 51,63 ****
# Normally, you shouldn't have to change anything below this point #
########################################################################
LIBOBJS = main.o scanner.o symbol.o include.o types.o parms.o emit.o newdoc.o ascii.o \
! html.o latex.o cplus.o lang.o hash.o sstring.o wrapfunc.o getopt.o comment.o \
typemap.o naming.o
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \
sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
LIB = ../libswig.a
--- 51,63 ----
# Normally, you shouldn't have to change anything below this point #
########################################################################
LIBOBJS = main.o scanner.o symbol.o include.o types.o parms.o emit.o newdoc.o ascii.o \
! html.o latex.o cplus.o lang.o hash.o vector.o sstring.o wrapfunc.o getopt.o comment.o \
typemap.o naming.o
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx vector.cxx \
sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
LIB = ../libswig.a

View File

@@ -0,0 +1,5 @@
*.pyc
.emacs.desktop
hangman_dict.txt
setup.bat
tmphtml.txt

View File

@@ -0,0 +1,13 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class ColoredPanel(wxWindow):
def __init__(self, parent, color):
wxWindow.__init__(self, parent, -1,
wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER)
self.SetBackgroundColour(color)
#---------------------------------------------------------------------------

View File

@@ -0,0 +1,126 @@
#!/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)
# 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(NULL, -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

@@ -0,0 +1,62 @@
from wxPython.wx import *
from wxPython.lib.layoutf import Layoutf
#---------------------------------------------------------------------------
class TestLayoutf(wxPanel):
def __init__(self, parent):
wxPanel.__init__(self, parent, -1)
self.SetAutoLayout(true)
EVT_BUTTON(self, 100, self.OnButton)
self.panelA = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
self.panelA.SetBackgroundColour(wxBLUE)
self.panelA.SetConstraints(Layoutf('t=t10#1;l=l10#1;b=b10#1;r%r50#1',(self,)))
self.panelB = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
self.panelB.SetBackgroundColour(wxRED)
self.panelB.SetConstraints(Layoutf('t=t10#1;r=r10#1;b%b30#1;l>10#2', (self,self.panelA)))
self.panelC = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
self.panelC.SetBackgroundColour(wxWHITE)
self.panelC.SetConstraints(Layoutf('t_10#3;r=r10#1;b=b10#1;l>10#2', (self,self.panelA,self.panelB)))
b = wxButton(self.panelA, 100, ' Panel A ')
b.SetConstraints(Layoutf('X=X#1;Y=Y#1;h*;w%w50#1', (self.panelA,)))
b = wxButton(self.panelB, 100, ' Panel B ')
b.SetConstraints(Layoutf('t=t2#1;r=r4#1;h*;w*', (self.panelB,)))
self.panelD = wxWindow(self.panelC, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
self.panelD.SetBackgroundColour(wxGREEN)
self.panelD.SetConstraints(Layoutf('b%h50#1;r%w50#1;h=h#2;w=w#2', (self.panelC, b)))
b = wxButton(self.panelC, 100, ' Panel C ')
b.SetConstraints(Layoutf('t_#1;l>#1;h*;w*', (self.panelD,)))
wxStaticText(self.panelD, -1, "Panel D", wxPoint(4, 4)).SetBackgroundColour(wxGREEN)
def OnButton(self, event):
wxBell()
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestLayoutf(nb)
return win
#---------------------------------------------------------------------------
overview = Layoutf.__doc__

336
utils/wxPython/demo/Main.py Normal file
View File

@@ -0,0 +1,336 @@
#!/bin/env python
#----------------------------------------------------------------------------
# Name: Main.py
# Purpose: Testing lots of stuff, controls, window types, etc.
#
# Author: Robin Dunn & Gary Dumer
#
# Created:
# RCS-ID: $Id$
# Copyright: (c) 1999 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
import sys, os
from wxPython.wx import *
#---------------------------------------------------------------------------
_treeList = [
('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']),
('Miscellaneous Windows', ['wxGrid', 'wxSashWindow',
'wxScrolledWindow', 'wxSplitterWindow',
'wxStatusBar', 'wxToolBar', 'wxNotebook']),
('Common Dialogs', ['wxColourDialog', 'wxDirDialog', 'wxFileDialog',
'wxSingleChoiceDialog', 'wxTextEntryDialog',
'wxFontDialog', 'wxPageSetupDialog', 'wxPrintDialog',
'wxMessageDialog', 'wxProgressDialog']),
('Controls', ['wxButton', 'wxCheckBox', 'wxCheckListBox', 'wxChoice',
'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'wxTextCtrl',
'wxTreeCtrl', 'wxSpinButton', 'wxStaticText', 'wxStaticBitmap',
'wxRadioBox', 'wxSlider']),
('Window Layout', ['wxLayoutConstraints', 'Sizers']),
('Miscellaneous', ['wxTimer', 'wxGLCanvas', 'DialogUnits', 'wxImage',
'PrintFramework']),
('wxPython Library', ['Sizers', 'Layoutf', 'wxScrolledMessageDialog',
'wxMultipleChoiceDialog', 'wxPlotCanvas']),
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
]
#---------------------------------------------------------------------------
class wxPythonDemo(wxFrame):
def __init__(self, parent, id, title):
wxFrame.__init__(self, parent, -1, title,
wxDefaultPosition, wxSize(700, 550))
if wxPlatform == '__WXMSW__':
self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO)
self.SetIcon(self.icon)
self.otherWin = None
EVT_IDLE(self, self.OnIdle)
self.Centre(wxBOTH)
self.CreateStatusBar(1, wxST_SIZEGRIP)
splitter = wxSplitterWindow(self, -1)
splitter2 = wxSplitterWindow(splitter, -1)
# Prevent TreeCtrl from displaying all items after destruction
self.dying = false
# Make a File menu
self.mainmenu = wxMenuBar()
menu = wxMenu()
mID = NewId()
menu.Append(mID, 'E&xit', 'Get the heck outta here!')
EVT_MENU(self, mID, self.OnFileExit)
self.mainmenu.Append(menu, '&File')
# Make a Help menu
mID = NewId()
menu = wxMenu()
menu.Append(mID, '&About', 'wxPython RULES!!!')
EVT_MENU(self, mID, self.OnHelpAbout)
self.mainmenu.Append(menu, '&Help')
self.SetMenuBar(self.mainmenu)
selectedDemo = None
selectedDemoName = "Nada"
if len(sys.argv) == 2:
selectedDemoName = sys.argv[1]
# Create a TreeCtrl
tID = NewId()
self.tree = wxTreeCtrl(splitter, tID)
root = self.tree.AddRoot("Overview")
for item in _treeList:
child = self.tree.AppendItem(root, item[0])
for childItem in item[1]:
theDemo = self.tree.AppendItem(child, childItem)
if childItem == selectedDemoName:
selectedDemo = theDemo
self.tree.Expand(root)
EVT_TREE_ITEM_EXPANDED (self.tree, tID, self.OnItemExpanded)
EVT_TREE_ITEM_COLLAPSED (self.tree, tID, self.OnItemCollapsed)
EVT_TREE_SEL_CHANGED (self.tree, tID, self.OnSelChanged)
# Create a Notebook
self.nb = wxNotebook(splitter2, -1)
# Set up a TextCtrl on the Overview Notebook page
self.ovr = wxTextCtrl(self.nb, -1, style = wxTE_MULTILINE|wxTE_READONLY)
self.nb.AddPage(self.ovr, "Overview")
# Set up a TextCtrl on the Demo Code Notebook page
self.txt = wxTextCtrl(self.nb, -1,
style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
self.txt.SetFont(wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false))
self.nb.AddPage(self.txt, "Demo Code")
# Set up a log on the View Log Notebook page
self.log = wxTextCtrl(splitter2, -1,
style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
(w, self.charHeight) = self.log.GetTextExtent('X')
#self.WriteText('wxPython Demo Log:\n')
# add the windows to the splitter and split it.
splitter.SplitVertically(self.tree, splitter2)
splitter.SetSashPosition(180, true)
splitter.SetMinimumPaneSize(20)
splitter2.SplitHorizontally(self.nb, self.log)
splitter2.SetSashPosition(360, true)
splitter2.SetMinimumPaneSize(20)
# make our log window be stdout
#sys.stdout = self
# select initial items
self.nb.SetSelection(0)
self.tree.SelectItem(root)
if selectedDemo:
self.tree.SelectItem(selectedDemo)
self.tree.EnsureVisible(selectedDemo)
#---------------------------------------------
def WriteText(self, text):
self.log.WriteText(text)
w, h = self.log.GetClientSizeTuple()
numLines = h/self.charHeight
x, y = self.log.PositionToXY(self.log.GetLastPosition())
self.log.ShowPosition(self.log.XYToPosition(x, y-numLines))
##self.log.ShowPosition(self.log.GetLastPosition())
self.log.SetInsertionPointEnd()
def write(self, txt):
self.WriteText(txt)
#---------------------------------------------
def OnItemExpanded(self, event):
item = event.GetItem()
self.log.WriteText("OnItemExpanded: %s\n" % self.tree.GetItemText(item))
#---------------------------------------------
def OnItemCollapsed(self, event):
item = event.GetItem()
self.log.WriteText("OnItemCollapsed: %s\n" % self.tree.GetItemText(item))
#---------------------------------------------
def OnSelChanged(self, event):
if self.dying:
return
if self.nb.GetPageCount() == 3:
if self.nb.GetSelection() == 2:
self.nb.SetSelection(0)
self.nb.DeletePage(2)
item = event.GetItem()
itemText = self.tree.GetItemText(item)
if itemText == 'Overview':
self.GetDemoFile('Main.py')
self.SetOverview('Overview', overview)
#self.nb.ResizeChildren();
self.nb.Refresh();
#wxYield()
else:
if os.path.exists(itemText + '.py'):
self.GetDemoFile(itemText + '.py')
module = __import__(itemText, globals())
self.SetOverview(itemText, module.overview)
# in case runTest is modal, make sure things look right...
self.nb.Refresh();
wxYield()
window = module.runTest(self, self.nb, self)
if window:
self.nb.AddPage(window, 'Demo')
self.nb.SetSelection(2)
self.nb.ResizeChildren();
else:
self.ovr.Clear()
self.txt.Clear()
#---------------------------------------------
# Get the Demo files
def GetDemoFile(self, filename):
self.txt.Clear()
#if not self.txt.LoadFile(filename):
# self.txt.WriteText("Cannot open %s file." % filename)
try:
self.txt.SetValue(open(filename).read())
except IOError:
self.txt.WriteText("Cannot open %s file." % filename)
self.txt.SetInsertionPoint(0)
self.txt.ShowPosition(0)
#---------------------------------------------
def SetOverview(self, name, text):
self.ovr.Clear()
self.ovr.WriteText(text)
self.nb.SetPageText(0, name)
self.ovr.SetInsertionPoint(0)
self.ovr.ShowPosition(0)
#---------------------------------------------
# Menu methods
def OnFileExit(self, event):
self.Close()
def OnHelpAbout(self, event):
about = wxMessageDialog(self,
"wxPython is a Python extension module that\n"
"encapsulates the wxWindows GUI classes.\n\n"
"This demo shows off some of the capabilities\n"
"of wxPython.\n\n"
" Developed by Robin Dunn",
"About wxPython", wxOK)
about.ShowModal()
about.Destroy()
#---------------------------------------------
def OnCloseWindow(self, event):
self.dying = true
self.Destroy()
#---------------------------------------------
def OnIdle(self, event):
if self.otherWin:
self.otherWin.Raise()
self.otherWin = None
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
class MyApp(wxApp):
def OnInit(self):
wxImage_AddHandler(wxJPEGHandler())
wxImage_AddHandler(wxPNGHandler())
wxImage_AddHandler(wxGIFHandler())
frame = wxPythonDemo(NULL, -1, "wxPython: (A Demonstration)")
frame.Show(true)
self.SetTopWindow(frame)
return true
#---------------------------------------------------------------------------
def main():
app = MyApp(0)
app.MainLoop()
#---------------------------------------------------------------------------
overview = """\
Python
------------
Python is an interpreted, interactive, object-oriented programming language often compared to Tcl, Perl, Scheme, or Java.
Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, and new built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface.
wxWindows
--------------------
wxWindows is a free C++ framework designed to make cross-platform programming child's play. Well, almost. wxWindows 2 supports Windows 3.1/95/98/NT, Unix with GTK/Motif/Lesstif, with a Mac version underway. Other ports are under consideration.
wxWindows is a set of libraries that allows C++ applications to compile and run on several different types of computers, with minimal source code changes. There is one library per supported GUI (such as Motif, or Windows). As well as providing a common API (Application Programming Interface) for GUI functionality, it provides functionality for accessing some commonly-used operating system facilities, such as copying or deleting files. wxWindows is a 'framework' in the sense that it provides a lot of built-in functionality, which the application can use or replace as required, thus saving a great deal of coding effort. Basic data structures such as strings, linked lists and hash tables are also supported.
wxPython
----------------
wxPython is a Python extension module that encapsulates the wxWindows GUI classes. Currently it is only available for the Win32 and GTK ports of wxWindows, but as soon as the other ports are brought up to the same level as Win32 and GTK, it should be fairly trivial to enable wxPython to be used with the new GUI.
The wxPython extension module attempts to mirror the class heiarchy of wxWindows as closely as possible. This means that there is a wxFrame class in wxPython that looks, smells, tastes and acts almost the same as the wxFrame class in the C++ version. Unfortunately, because of differences in the languages, wxPython doesn't match wxWindows exactly, but the differences should be easy to absorb because they are natural to Python. For example, some methods that return multiple values via argument pointers in C++ will return a tuple of values in Python.
There is still much to be done for wxPython, many classes still need to be mirrored. Also, wxWindows is still somewhat of a moving target so it is a bit of an effort just keeping wxPython up to date. On the other hand, there are enough of the core classes completed that useful applications can be written.
wxPython is close enough to the C++ version that the majority of the wxPython documentation is actually just notes attached to the C++ documents that describe the places where wxPython is different. There is also a series of sample programs included, and a series of documentation pages that assist the programmer in getting started with wxPython.
"""
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
if __name__ == '__main__':
main()
#----------------------------------------------------------------------------

View File

@@ -0,0 +1,179 @@
from wxPython.wx import *
from wxPython.lib.sizers import *
from wxScrolledWindow import MyCanvas
#----------------------------------------------------------------------
class MyPrintout(wxPrintout):
def __init__(self, canvas, log):
wxPrintout.__init__(self)
self.canvas = canvas
self.log = log
def OnBeginDocument(self, start, end):
self.log.WriteText("wxPrintout.OnBeginDocument\n")
return self.base_OnBeginDocument(start, end)
def OnEndDocument(self):
self.log.WriteText("wxPrintout.OnEndDocument\n")
self.base_OnEndDocument()
def OnBeginPrinting(self):
self.log.WriteText("wxPrintout.OnBeginPrinting\n")
self.base_OnBeginPrinting()
def OnEndPrinting(self):
self.log.WriteText("wxPrintout.OnEndPrinting\n")
self.base_OnEndPrinting()
def OnPreparePrinting(self):
self.log.WriteText("wxPrintout.OnPreparePrinting\n")
self.base_OnPreparePrinting()
def HasPage(self, page):
self.log.WriteText("wxPrintout.HasPage\n")
if page == 1:
return true
else:
return false
def GetPageInfo(self):
self.log.WriteText("wxPrintout.GetPageInfo\n")
return (1, 1, 1, 1)
def OnPrintPage(self, page):
self.log.WriteText("wxPrintout.OnPrintPage\n")
dc = self.GetDC()
#-------------------------------------------
# One possible method of setting scaling factors...
maxX = self.canvas.getWidth()
maxY = self.canvas.getHeight()
# Let's have at least 50 device units margin
marginX = 50
marginY = 50
# Add the margin to the graphic size
maxX = maxX + (2 * marginX)
maxY = maxY + (2 * marginY)
# Get the size of the DC in pixels
(w, h) = dc.GetSizeTuple()
# Calculate a suitable scaling factor
scaleX = float(w) / maxX
scaleY = float(h) / maxY
# Use x or y scaling factor, whichever fits on the DC
actualScale = min(scaleX, scaleY)
# Calculate the position on the DC for centring the graphic
posX = (w - (self.canvas.getWidth() * actualScale)) / 2.0
posY = (h - (self.canvas.getHeight() * actualScale)) / 2.0
# Set the scale and origin
dc.SetUserScale(actualScale, actualScale)
dc.SetDeviceOrigin(int(posX), int(posY))
#-------------------------------------------
self.canvas.DoDrawing(dc)
return true
#----------------------------------------------------------------------
class TestPrintPanel(wxPanel):
def __init__(self, parent, frame, log):
wxPanel.__init__(self, parent, -1)
self.log = log
self.frame = frame
self.printData = wxPrintData()
self.printData.SetPaperId(wxPAPER_LETTER)
self.box = box.wxBoxSizer(wxVERTICAL)
self.canvas = MyCanvas(self)
self.box.Add(self.canvas, 1)
subbox = wxBoxSizer(wxHORIZONTAL)
btn = wxButton(self, 1201, "Print Setup")
EVT_BUTTON(self, 1201, self.OnPrintSetup)
subbox.Add(btn, 1)
btn = wxButton(self, 1202, "Print Preview")
EVT_BUTTON(self, 1202, self.OnPrintPreview)
subbox.Add(btn, 1)
btn = wxButton(self, 1203, "Print")
EVT_BUTTON(self, 1203, self.OnDoPrint)
subbox.Add(btn, 1)
self.box.Add(subbox)
def OnSize(self, event):
size = self.GetClientSize()
self.box.Layout(size)
def OnPrintSetup(self, event):
printerDialog = wxPrintDialog(self)
printerDialog.GetPrintDialogData().SetPrintData(self.printData)
printerDialog.GetPrintDialogData().SetSetupDialog(true)
printerDialog.ShowModal();
self.printData = printerDialog.GetPrintDialogData().GetPrintData()
printerDialog.Destroy()
def OnPrintPreview(self, event):
self.log.WriteText("OnPrintPreview\n")
printout = MyPrintout(self.canvas, self.log)
printout2 = MyPrintout(self.canvas, self.log)
self.preview = wxPrintPreview(printout, printout2, self.printData)
if not self.preview.Ok():
self.log.WriteText("Houston, we have a problem...\n")
return
frame = wxPreviewFrame(self.preview, self.frame, "This is a print preview")
frame.Initialize()
frame.SetPosition(self.frame.GetPosition())
frame.SetSize(self.frame.GetSize())
frame.Show(true)
def OnDoPrint(self, event):
pdd = wxPrintDialogData()
pdd.SetPrintData(self.printData)
printer = wxPrinter(pdd)
printout = MyPrintout(self.canvas, self.log)
if not printer.Print(self.frame, printout):
wxMessageBox("There was a problem printing.\nPerhaps your current printer is not set correctly?", "Printing", wxOK)
else:
self.printData = printer.GetPrintDialogData().GetPrintData()
printout.Destroy()
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPrintPanel(nb, frame, log)
return win
#----------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,7 @@
To run the main demo in this directory, execute demo.py. In other
words, one of the following commands should do it:
demo.py
python demo.py
pythonw demo.py

View File

@@ -0,0 +1,365 @@
#----------------------------------------------------------------------
# sizer test code
#----------------------------------------------------------------------
from wxPython.wx import *
from wxPython.lib.sizers import *
#----------------------------------------------------------------------
def makeSimpleBox1(win):
box = wxBoxSizer(wxHORIZONTAL)
box.Add(wxButton(win, 1010, "one"), 0)
box.Add(wxButton(win, 1010, "two"), 0)
box.Add(wxButton(win, 1010, "three"), 0)
box.Add(wxButton(win, 1010, "four"), 0)
return box
#----------------------------------------------------------------------
def makeSimpleBox2(win):
box = wxBoxSizer(wxVERTICAL)
box.Add(wxButton(win, 1010, "one"), 0)
box.Add(wxButton(win, 1010, "two"), 0)
box.Add(wxButton(win, 1010, "three"), 0)
box.Add(wxButton(win, 1010, "four"), 0)
return box
#----------------------------------------------------------------------
def makeSimpleBox3(win):
box = wxBoxSizer(wxHORIZONTAL)
box.Add(wxButton(win, 1010, "one"), 0)
box.Add(wxButton(win, 1010, "two"), 0)
box.Add(wxButton(win, 1010, "three"), 0)
box.Add(wxButton(win, 1010, "four"), 0)
box.Add(wxButton(win, 1010, "five"), 1)
return box
#----------------------------------------------------------------------
def makeSimpleBox4(win):
box = wxBoxSizer(wxHORIZONTAL)
box.Add(wxButton(win, 1010, "one"), 0)
box.Add(wxButton(win, 1010, "two"), 0)
box.Add(wxButton(win, 1010, "three"), 1)
box.Add(wxButton(win, 1010, "four"), 1)
box.Add(wxButton(win, 1010, "five"), 1)
return box
#----------------------------------------------------------------------
def makeSimpleBox5(win):
box = wxBoxSizer(wxHORIZONTAL)
box.Add(wxButton(win, 1010, "one"), 0)
box.Add(wxButton(win, 1010, "two"), 0)
box.Add(wxButton(win, 1010, "three"), 3)
box.Add(wxButton(win, 1010, "four"), 1)
box.Add(wxButton(win, 1010, "five"), 1)
return box
#----------------------------------------------------------------------
def makeSimpleBox6(win):
box = wxBoxSizer(wxHORIZONTAL, wxSize(250, 50))
box.Add(wxButton(win, 1010, "10"), 10)
box.Add(wxButton(win, 1010, "20"), 20)
box.Add(wxButton(win, 1010, "30"), 30)
box.Add(wxButton(win, 1010, "15"), 15)
box.Add(wxButton(win, 1010, "5"), 5)
return box
#----------------------------------------------------------------------
def makeSimpleBorder1(win):
bdr = wxBorderSizer(wxALL)
btn = wxButton(win, 1010, "border")
btn.SetSize(wxSize(80, 80))
bdr.Add(btn, 15)
return bdr
#----------------------------------------------------------------------
def makeSimpleBorder2(win):
bdr = wxBorderSizer(wxEAST | wxWEST)
btn = wxButton(win, 1010, "border")
btn.SetSize(wxSize(80, 80))
bdr.Add(btn, 15)
return bdr
#----------------------------------------------------------------------
def makeSimpleBorder3(win):
bdr = wxBorderSizer(wxNORTH | wxWEST)
btn = wxButton(win, 1010, "border")
btn.SetSize(wxSize(80, 80))
bdr.Add(btn, 15)
return bdr
#----------------------------------------------------------------------
#----------------------------------------------------------------------
def makeBoxInBox(win):
box = wxBoxSizer(wxVERTICAL)
box.Add(wxButton(win, 1010, "one"))
box2 = wxBoxSizer(wxHORIZONTAL)
box2.AddMany([ wxButton(win, 1010, "two"),
wxButton(win, 1010, "three"),
wxButton(win, 1010, "four"),
wxButton(win, 1010, "five"),
])
box3 = wxBoxSizer(wxVERTICAL)
box3.AddMany([ (wxButton(win, 1010, "six"), 0),
(wxButton(win, 1010, "seven"), 2),
(wxButton(win, 1010, "eight"), 1),
(wxButton(win, 1010, "nine"), 1),
])
box2.Add(box3, 1)
box.Add(box2, 1)
box.Add(wxButton(win, 1010, "ten"))
return box
#----------------------------------------------------------------------
def makeBoxInBorder(win):
bdr = wxBorderSizer(wxALL)
box = makeSimpleBox3(win)
bdr.Add(box, 15)
return bdr
#----------------------------------------------------------------------
def makeBorderInBox(win):
insideBox = wxBoxSizer(wxHORIZONTAL)
box2 = wxBoxSizer(wxHORIZONTAL)
box2.AddMany([ wxButton(win, 1010, "one"),
wxButton(win, 1010, "two"),
wxButton(win, 1010, "three"),
wxButton(win, 1010, "four"),
wxButton(win, 1010, "five"),
])
insideBox.Add(box2, 0)
bdr = wxBorderSizer(wxALL)
bdr.Add(wxButton(win, 1010, "border"), 20)
insideBox.Add(bdr, 1)
box3 = wxBoxSizer(wxVERTICAL)
box3.AddMany([ (wxButton(win, 1010, "six"), 0),
(wxButton(win, 1010, "seven"), 2),
(wxButton(win, 1010, "eight"), 1),
(wxButton(win, 1010, "nine"), 1),
])
insideBox.Add(box3, 1)
outsideBox = wxBoxSizer(wxVERTICAL)
outsideBox.Add(wxButton(win, 1010, "top"))
outsideBox.Add(insideBox, 1)
outsideBox.Add(wxButton(win, 1010, "bottom"))
return outsideBox
#----------------------------------------------------------------------
theTests = [
("Simple horizontal boxes", makeSimpleBox1,
"This is a HORIZONTAL box sizer with four non-stretchable buttons held "
"within it. Notice that the buttons are added and aligned in the horizontal "
"dimension. Also notice that they are fixed size in the horizontal dimension, "
"but will stretch vertically."
),
("Simple vertical boxes", makeSimpleBox2,
"Exactly the same as the previous sample but using a VERTICAL box sizer "
"instead of a HORIZONTAL one."
),
("Add a stretchable", makeSimpleBox3,
"We've added one more button with the strechable flag turned on. Notice "
"how it grows to fill the extra space in the otherwise fixed dimension."
),
("More than one stretchable", makeSimpleBox4,
"Here there are several items that are stretchable, they all divide up the "
"extra space evenly."
),
("Weighting factor", makeSimpleBox5,
"This one shows more than one strechable, but one of them has a weighting "
"factor so it gets more of the free space."
),
# ("Percent Sizer", makeSimpleBox6,
# "You can use the wxBoxSizer like a Percent Sizer. Just make sure that all "
# "the weighting factors add up to 100!"
# ),
("", None, ""),
("Simple border sizer", makeSimpleBorder1,
"The wxBorderSizer leaves empty space around its contents. This one "
"gives a border all the way around."
),
("East and West border", makeSimpleBorder2,
"You can pick and choose which sides have borders."
),
("North and West border", makeSimpleBorder3,
"You can pick and choose which sides have borders."
),
("", None, ""),
("Boxes inside of boxes", makeBoxInBox,
"This one shows nesting of boxes within boxes within boxes, using both "
"orientations. Notice also that button seven has a greater weighting "
"factor than its siblings."
),
("Boxes inside a Border", makeBoxInBorder,
"Sizers of different types can be nested withing each other as well. "
"Here is a box sizer with several buttons embedded within a border sizer."
),
("Border in a Box", makeBorderInBox,
"Another nesting example. This one has Boxes and a Border inside another Box."
),
]
#----------------------------------------------------------------------
class TestFrame(wxFrame):
def __init__(self, parent, title, sizerFunc):
wxFrame.__init__(self, parent, -1, title)
EVT_BUTTON(self, 1010, self.OnButton)
self.sizer = sizerFunc(self)
self.CreateStatusBar()
self.SetStatusText("Resize this frame to see how the sizers respond...")
self.sizer.FitWindow(self)
def OnSize(self, event):
size = self.GetClientSize()
self.sizer.Layout(size)
def OnCloseWindow(self, event):
self.MakeModal(false)
self.Destroy()
def OnButton(self, event):
self.Close(true)
#----------------------------------------------------------------------
class TestSelectionPanel(wxPanel):
def __init__(self, parent, frame):
wxPanel.__init__(self, parent, -1)
self.frame = frame
self.list = wxListBox(self, 401,
wxDLG_PNT(self, 10, 10), wxDLG_SZE(self, 100, 60),
[])
EVT_LISTBOX(self, 401, self.OnSelect)
EVT_LISTBOX_DCLICK(self, 401, self.OnDClick)
wxButton(self, 402, "Try it!", wxDLG_PNT(self, 120, 10)).SetDefault()
EVT_BUTTON(self, 402, self.OnDClick)
self.text = wxTextCtrl(self, -1, "",
wxDLG_PNT(self, 10, 80),
wxDLG_SZE(self, 200, 60),
wxTE_MULTILINE | wxTE_READONLY)
for item in theTests:
self.list.Append(item[0])
def OnSelect(self, event):
pos = self.list.GetSelection()
self.text.SetValue(theTests[pos][2])
def OnDClick(self, event):
pos = self.list.GetSelection()
title = theTests[pos][0]
func = theTests[pos][1]
if func:
win = TestFrame(self, title, func)
win.CentreOnParent(wxBOTH)
win.Show(true)
win.MakeModal(true)
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestSelectionPanel(nb, frame)
return win
overview = wxSizer.__doc__ + '\n' + '-' * 80 + '\n' + \
wxBoxSizer.__doc__ + '\n' + '-' * 80 + '\n' + \
wxBorderSizer.__doc__
#----------------------------------------------------------------------
if __name__ == '__main__':
class MainFrame(wxFrame):
def __init__(self):
wxFrame.__init__(self, NULL, -1, "Testing...")
self.CreateStatusBar()
mainmenu = wxMenuBar()
menu = wxMenu()
menu.Append(200, 'E&xit', 'Get the heck outta here!')
mainmenu.Append(menu, "&File")
self.SetMenuBar(mainmenu)
EVT_MENU(self, 200, self.OnExit)
self.panel = TestSelectionPanel(self)
self.SetSize(wxSize(400, 380))
def OnCloseWindow(self, event):
self.Destroy()
def OnExit(self, event):
self.Close(true)
class TestApp(wxApp):
def OnInit(self):
frame = MainFrame()
frame.Show(true)
self.SetTopWindow(frame)
return true
app = TestApp(0)
app.MainLoop()
#----------------------------------------------------------------------

View File

@@ -0,0 +1,378 @@
#!/usr/bin/python
"""This is SlashDot 1.2
It's the obligatory Slashdot.org headlines reader that
any modern widget set/library must have in order to be taken
seriously :-)
Usage is quite simple; wxSlash attempts to download the
'ultramode.txt' file from http://slashdot.org, which
contains the headlines in a computer friendly format. It
then displays said headlines in a wxWindows list control.
You can read articles using either Python's html library
or an external browser. Uncheck the 'browser->internal' menu
item to use the latter option. Use the settings dialog box
to set which external browser is started.
This code is available under the wxWindows license, see
elsewhere. If you modify this code, be aware of the fact
that slashdot.org's maintainer, CmdrTaco, explicitly asks
'ultramode.txt' downloaders not to do this automatically
more than twice per hour. If this feature is abused,
CmdrTaco may remove the ultramode file completely and that
will make a *lot* of people unhappy.
I want to thank Alex Shnitman whose slashes.pl
(Perl/GTK) script gave me the idea for this applet.
Have fun with it,
Harm van der Heijden (H.v.d.Heijden@phys.tue.nl)
"""
from wxPython.wx import *
from httplib import HTTP
from htmllib import HTMLParser
import os
import re
import formatter
class HTMLTextView(wxFrame):
def __init__(self, parent, id, title='HTMLTextView', url=None):
wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition,
wxSize(600,400))
self.mainmenu = wxMenuBar()
menu = wxMenu()
menu.Append(201, '&Open URL...', 'Open URL')
EVT_MENU(self, 201, self.OnFileOpen)
menu.Append(209, 'E&xit', 'Exit viewer')
EVT_MENU(self, 209, self.OnFileExit)
self.mainmenu.Append(menu, '&File')
self.SetMenuBar(self.mainmenu)
self.CreateStatusBar(1)
self.text = wxTextCtrl(self, -1, "", wxPyDefaultPosition,
wxPyDefaultSize, wxTE_MULTILINE | wxTE_READONLY)
if (url):
self.OpenURL(url)
def logprint(self, x):
self.SetStatusText(x)
def OpenURL(self, url):
self.url = url
m = re.match('file:(\S+)\s*', url)
if m:
f = open(m.groups()[0],'r')
else:
m = re.match('http://([^/]+)(/\S*)\s*', url)
if m:
host = m.groups()[0]
path = m.groups()[1]
else:
m = re.match('http://(\S+)\s*', url)
if not m:
# Invalid URL
self.logprint("Invalid or unsupported URL: %s" % (url))
return
host = m.groups()[0]
path = ''
f = RetrieveAsFile(host,path,self.logprint)
if not f:
self.logprint("Could not open %s" % (url))
return
self.logprint("Receiving data...")
data = f.read()
tmp = open('tmphtml.txt','w')
fmt = formatter.AbstractFormatter(formatter.DumbWriter(tmp))
p = HTMLParser(fmt)
self.logprint("Parsing data...")
p.feed(data)
p.close()
tmp.close()
tmp = open('tmphtml.txt', 'r')
self.text.SetValue(tmp.read())
self.SetTitle(url)
self.logprint(url)
def OnFileOpen(self, event):
dlg = wxTextEntryDialog(self, "Enter URL to open:", "")
if dlg.ShowModal() == wxID_OK:
url = dlg.GetValue()
else:
url = None
if url:
self.OpenURL(url)
def OnFileExit(self, event):
self.Close()
def OnCloseWindow(self, event):
self.Destroy()
def ParseSlashdot(f):
art_sep = re.compile('%%\r?\n')
line_sep = re.compile('\r?\n')
data = f.read()
list = art_sep.split(data)
art_list = []
for i in range(1,len(list)-1):
art_list.append(line_sep.split(list[i]))
return art_list
def myprint(x):
print x
def RetrieveAsFile(host, path='', logprint = myprint):
try:
h = HTTP(host)
except:
logprint("Failed to create HTTP connection to %s... is the network available?" % (host))
return None
h.putrequest('GET',path)
h.putheader('Accept','text/html')
h.putheader('Accept','text/plain')
h.endheaders()
errcode, errmsg, headers = h.getreply()
if errcode != 200:
logprint("HTTP error code %d: %s" % (errcode, errmsg))
return None
f = h.getfile()
# f = open('/home/harm/ultramode.txt','r')
return f
class AppStatusBar(wxStatusBar):
def __init__(self, parent):
wxStatusBar.__init__(self,parent, -1)
self.SetFieldsCount(2)
self.SetStatusWidths([-1, 100])
self.but = wxButton(self, 1001, "Refresh")
EVT_BUTTON(self, 1001, parent.OnViewRefresh)
self.OnSize(None)
def logprint(self,x):
self.SetStatusText(x,0)
def OnSize(self, event):
rect = self.GetFieldRect(1)
self.but.SetPosition(wxPoint(rect.x+2, rect.y+2))
self.but.SetSize(wxSize(rect.width-4, rect.height-4))
# This is a simple timer class to start a function after a short delay;
class QuickTimer(wxTimer):
def __init__(self, func, wait=100):
wxTimer.__init__(self)
self.callback = func
self.Start(wait); # wait .1 second (.001 second doesn't work. why?)
def Notify(self):
self.Stop();
apply(self.callback, ());
class AppFrame(wxFrame):
def __init__(self, parent, id, title):
wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition,
wxSize(650, 250))
# if the window manager closes the window:
EVT_CLOSE(self, self.OnCloseWindow);
# Now Create the menu bar and items
self.mainmenu = wxMenuBar()
menu = wxMenu()
menu.Append(209, 'E&xit', 'Enough of this already!')
EVT_MENU(self, 209, self.OnFileExit)
self.mainmenu.Append(menu, '&File')
menu = wxMenu()
menu.Append(210, '&Refresh', 'Refresh headlines')
EVT_MENU(self, 210, self.OnViewRefresh)
menu.Append(211, '&Slashdot Index', 'View Slashdot index')
EVT_MENU(self, 211, self.OnViewIndex)
menu.Append(212, 'Selected &Article', 'View selected article')
EVT_MENU(self, 212, self.OnViewArticle)
self.mainmenu.Append(menu, '&View')
menu = wxMenu()
menu.Append(220, '&Internal', 'Use internal text browser',TRUE)
menu.Check(220, true)
self.UseInternal = 1;
EVT_MENU(self, 220, self.OnBrowserInternal)
menu.Append(222, '&Settings...', 'External browser Settings')
EVT_MENU(self, 222, self.OnBrowserSettings)
self.mainmenu.Append(menu, '&Browser')
menu = wxMenu()
menu.Append(230, '&About', 'Some documentation');
EVT_MENU(self, 230, self.OnAbout)
self.mainmenu.Append(menu, '&Help')
self.SetMenuBar(self.mainmenu)
if wxPlatform == '__WXGTK__':
# I like lynx. Also Netscape 4.5 doesn't react to my cmdline opts
self.BrowserSettings = "xterm -e lynx %s &"
elif wxPlatform == '__WXMSW__':
# netscape 4.x likes to hang out here...
self.BrowserSettings = '\\progra~1\\Netscape\\Communicator\\Program\\netscape.exe %s'
else:
# a wild guess...
self.BrowserSettings = 'netscape %s'
# A status bar to tell people what's happening
self.sb = AppStatusBar(self)
self.SetStatusBar(self.sb)
self.list = wxListCtrl(self, 1100)
self.list.SetSingleStyle(wxLC_REPORT)
self.list.InsertColumn(0, 'Subject')
self.list.InsertColumn(1, 'Date')
self.list.InsertColumn(2, 'Posted by')
self.list.InsertColumn(3, 'Comments')
self.list.SetColumnWidth(0, 300)
self.list.SetColumnWidth(1, 150)
self.list.SetColumnWidth(2, 100)
self.list.SetColumnWidth(3, 100)
EVT_LIST_ITEM_SELECTED(self, 1100, self.OnItemSelected)
EVT_LEFT_DCLICK(self.list, self.OnLeftDClick)
self.logprint("Connecting to slashdot... Please wait.")
# wxYield doesn't yet work here. That's why we use a timer
# to make sure that we see some GUI stuff before the slashdot
# file is transfered.
self.timer = QuickTimer(self.DoRefresh, 1000)
def logprint(self, x):
self.sb.logprint(x)
def OnFileExit(self, event):
self.Destroy()
def DoRefresh(self):
f = RetrieveAsFile('slashdot.org','/ultramode.txt',self.sb.logprint)
art_list = ParseSlashdot(f)
self.list.DeleteAllItems()
self.url = []
self.current = -1
i = 0;
for article in art_list:
self.list.InsertStringItem(i, article[0])
self.list.SetStringItem(i, 1, article[2])
self.list.SetStringItem(i, 2, article[3])
self.list.SetStringItem(i, 3, article[6])
self.url.append(article[1])
i = i + 1
self.logprint("File retrieved OK.")
def OnViewRefresh(self, event):
self.logprint("Connecting to slashdot... Please wait.");
wxYield()
self.DoRefresh()
def DoViewIndex(self):
if self.UseInternal:
self.view = HTMLTextView(self, -1, 'slashdot.org',
'http://slashdot.org')
self.view.Show(true)
else:
self.logprint(self.BrowserSettings % ('http://slashdot.org'))
#os.system(self.BrowserSettings % ('http://slashdot.org'))
wxExecute(self.BrowserSettings % ('http://slashdot.org'))
self.logprint("OK")
def OnViewIndex(self, event):
self.logprint("Starting browser... Please wait.")
wxYield()
self.DoViewIndex()
def DoViewArticle(self):
if self.current<0: return
url = self.url[self.current]
if self.UseInternal:
self.view = HTMLTextView(self, -1, url, url)
self.view.Show(true)
else:
self.logprint(self.BrowserSettings % (url))
os.system(self.BrowserSettings % (url))
self.logprint("OK")
def OnViewArticle(self, event):
self.logprint("Starting browser... Please wait.")
wxYield()
self.DoViewArticle()
def OnBrowserInternal(self, event):
if self.mainmenu.Checked(220):
self.UseInternal = 1
else:
self.UseInternal = 0
def OnBrowserSettings(self, event):
dlg = wxTextEntryDialog(self, "Enter command to view URL.\nUse %s as a placeholder for the URL.", "", self.BrowserSettings);
if dlg.ShowModal() == wxID_OK:
self.BrowserSettings = dlg.GetValue()
def OnAbout(self, event):
dlg = wxMessageDialog(self, __doc__, "wxSlash", wxOK | wxICON_INFORMATION)
dlg.ShowModal()
def OnItemSelected(self, event):
self.current = event.m_itemIndex
self.logprint("URL: %s" % (self.url[self.current]))
def OnLeftDClick(self, event):
(x,y) = event.Position();
# Actually, we should convert x,y to logical coords using
# a dc, but only for a wxScrolledWindow widget.
# Now wxGTK derives wxListCtrl from wxScrolledWindow,
# and wxMSW from wxControl... So that doesn't work.
#dc = wxClientDC(self.list)
##self.list.PrepareDC(dc)
#x = dc.DeviceToLogicalX( event.GetX() )
#y = dc.DeviceToLogicalY( event.GetY() )
id = self.list.HitTest(wxPoint(x,y))
#print "Double click at %d %d" % (x,y), id
# Okay, we got a double click. Let's assume it's the current selection
wxYield()
self.OnViewArticle(event)
def OnCloseWindow(self, event):
self.Destroy()
#---------------------------------------------------------------------------
# if running standalone
if __name__ == '__main__':
class MyApp(wxApp):
def OnInit(self):
frame = AppFrame(NULL, -1, "Slashdot Breaking News")
frame.Show(true)
self.SetTopWindow(frame)
return true
app = MyApp(0)
app.MainLoop()
#---------------------------------------------------------------------------
# if running as part of the Demo Framework...
def runTest(frame, nb, log):
win = AppFrame(NULL, -1, "Slashdot Breaking News")
frame.otherWin = win
win.Show(true)
overview = __doc__
#----------------------------------------------------------------------------

View File

@@ -0,0 +1,66 @@
import string
from wxPython.wx import *
try:
from xml.parsers import pyexpat
haveXML = true
except ImportError:
haveXML = false
#----------------------------------------------------------------------
if not haveXML:
def runTest(frame, nb, log):
dlg = wxMessageDialog(frame, 'This demo requires the XML package. See http://www.python.org/sigs/xml-sig/',
'Sorry', wxOK | wxICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
else:
class XMLTree(wxTreeCtrl):
def __init__(self, parent, ID):
wxTreeCtrl.__init__(self, parent, ID)
self.nodeStack = [self.AddRoot("Root")]
# Define a handler for start element events
def StartElement(self, name, attrs ):
self.nodeStack.append(self.AppendItem(self.nodeStack[-1], name))
def EndElement(self, name ):
self.nodeStack = self.nodeStack[:-1]
def CharacterData(self, data ):
if string.strip(data):
self.AppendItem(self.nodeStack[-1], data)
def LoadTree(self, filename):
# Create a parser
Parser = pyexpat.ParserCreate()
# Tell the parser what the start element handler is
Parser.StartElementHandler = self.StartElement
Parser.EndElementHandler = self.EndElement
Parser.CharacterDataHandler = self.CharacterData
# Parse the XML File
ParserStatus = Parser.Parse(open(filename,'r').read(), 1)
def runTest(frame, nb, log):
win = XMLTree(nb, -1)
win.LoadTree("paper.xml")
return win
#----------------------------------------------------------------------
overview = """\
"""

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

4
utils/wxPython/demo/demo.py Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env python
import Main
Main.main()

View File

@@ -0,0 +1,121 @@
#!/usr/bin/env python
#---------------------------------------------------------------------------
"""
This demo attempts to override the C++ MainLoop and implement it
in Python. This is not part of the demo framework.
THIS FEATURE IS STILL EXPERIMENTAL...
"""
from wxPython.wx import *
import time
#---------------------------------------------------------------------------
class MyFrame(wxFrame):
def __init__(self, parent, id, title):
wxFrame.__init__(self, parent, id, title,
wxPoint(100, 100), wxSize(160, 150))
EVT_SIZE(self, self.OnSize)
EVT_MOVE(self, self.OnMove)
EVT_CLOSE(self, self.OnCloseWindow)
EVT_IDLE(self, self.OnIdle)
self.count = 0
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)
wxStaticText(panel, -1, "Idle:",
wxDLG_PNT(panel, wxPoint(4, 28)), 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)
self.idleCtrl = wxTextCtrl(panel, -1, "",
wxDLG_PNT(panel, wxPoint(24, 28)),
wxDLG_SZE(panel, wxSize(36, -1)),
wxTE_READONLY)
def OnCloseWindow(self, event):
app.keepGoing = false
self.Destroy()
def OnIdle(self, event):
self.idleCtrl.SetValue(str(self.count))
self.count = self.count + 1
def OnSize(self, event):
size = event.GetSize()
self.sizeCtrl.SetValue("%s, %s" % (size.width, size.height))
event.Skip()
def OnMove(self, event):
pos = event.GetPosition()
self.posCtrl.SetValue("%s, %s" % (pos.x, pos.y))
#---------------------------------------------------------------------------
class MyApp(wxApp):
def MainLoop(self):
# This outer loop determines when to exit the application, for
# this example we let the main frame reset this flag when it
# closes.
while self.keepGoing:
# At this point in the outer loop you could do whatever you
# implemented your own MainLoop for. It should be quick and
# non-blocking, otherwise your GUI will freeze. For example,
# call Fnorb's reactor.do_one_event(0), etc.
# call_your_code_here()
# This inner loop will process any GUI events until there
# are no more waiting.
while self.Pending():
self.Dispatch()
# Send idle events to idle handlers. You may want to throtle
# this back a bit so there is not too much CPU time spent in
# the idle handlers. For this example, I'll just snooze a
# little...
time.sleep(0.25)
self.ProcessIdle()
def OnInit(self):
frame = MyFrame(NULL, -1, "This is a test")
frame.Show(true)
self.SetTopWindow(frame)
self.keepGoing = true
return true
app = MyApp(0)
app.MainLoop()

View File

@@ -0,0 +1,465 @@
"""Hangman.py, a simple wxPython game, inspired by the
old bsd game by Ken Arnold.
From the original man page:
In hangman, the computer picks a word from the on-line
word list and you must try to guess it. The computer
keeps track of which letters have been guessed and how
many wrong guesses you have made on the screen in a
graphic fashion.
That says it all, doesn't it?
Have fun with it,
Harm van der Heijden (H.v.d.Heijden@phys.tue.nl)"""
import random,re,string
from wxPython.wx import *
class WordFetcher:
builtin_words = ' albatros banana electrometer eggshell'
def __init__(self, filename, min_length = 5):
self.min_length = min_length
print "Trying to open file %s" % (filename,)
try:
f = open(filename, "r")
except:
print "Couldn't open dictionary file %s, using builtins" % (filename,)
self.words = self.builtin_words
self.filename = None
return
self.words = f.read()
self.filename = filename
print "Got %d bytes." % (len(self.words),)
def SetMinLength(min_length):
self.min_length = min_length
def Get(self):
reg = re.compile('\s+([a-zA-Z]+)\s+')
n = 50 # safety valve; maximum number of tries to find a suitable word
while n:
index = int(random.random()*len(self.words))
m = reg.search(self.words[index:])
if m and len(m.groups()[0]) >= self.min_length: break
n = n - 1
if n: return string.lower(m.groups()[0])
return "error"
def stdprint(x):
print x
class URLWordFetcher(WordFetcher):
def __init__(self, url):
self.OpenURL(url)
WordFetcher.__init__(self, "hangman_dict.txt")
def logprint(self,x):
print x
def RetrieveAsFile(self, host, path=''):
from httplib import HTTP
try:
h = HTTP(host)
except:
self.logprint("Failed to create HTTP connection to %s... is the network available?" % (host))
return None
h.putrequest('GET',path)
h.putheader('Accept','text/html')
h.putheader('Accept','text/plain')
h.endheaders()
errcode, errmsg, headers = h.getreply()
if errcode != 200:
self.logprint("HTTP error code %d: %s" % (errcode, errmsg))
return None
f = h.getfile()
return f
def OpenURL(self,url):
from htmllib import HTMLParser
import formatter
self.url = url
m = re.match('http://([^/]+)(/\S*)\s*', url)
if m:
host = m.groups()[0]
path = m.groups()[1]
else:
m = re.match('http://(\S+)\s*', url)
if not m:
# Invalid URL
self.logprint("Invalid or unsupported URL: %s" % (url))
return
host = m.groups()[0]
path = ''
f = self.RetrieveAsFile(host,path)
if not f:
self.logprint("Could not open %s" % (url))
return
self.logprint("Receiving data...")
data = f.read()
tmp = open('hangman_dict.txt','w')
fmt = formatter.AbstractFormatter(formatter.DumbWriter(tmp))
p = HTMLParser(fmt)
self.logprint("Parsing data...")
p.feed(data)
p.close()
tmp.close()
class HangmanWnd(wxWindow):
def __init__(self, parent, id, pos=wxDefaultPosition, size=wxDefaultSize):
wxWindow.__init__(self, parent, id, pos, size)
self.SetBackgroundColour(wxNamedColour('white'))
if wxPlatform == '__WXGTK__':
self.font = wxFont(12, wxMODERN, wxNORMAL, wxNORMAL)
else:
self.font = wxFont(10, wxMODERN, wxNORMAL, wxNORMAL)
self.SetFocus()
def StartGame(self, word):
self.word = word
self.guess = []
self.tries = 0
self.misses = 0
self.Draw()
def EndGame(self):
self.misses = 7;
self.guess = map(chr, range(ord('a'),ord('z')+1))
self.Draw()
def HandleKey(self, key):
self.message = ""
if self.guess.count(key):
self.message = 'Already guessed %s' % (key,)
return 0
self.guess.append(key)
self.guess.sort()
self.tries = self.tries+1
if not key in self.word:
self.misses = self.misses+1
if self.misses == 7:
self.EndGame()
return 1
has_won = 1
for letter in self.word:
if not self.guess.count(letter):
has_won = 0
break
if has_won:
self.Draw()
return 2
self.Draw()
return 0
def Draw(self, dc = None):
if not dc:
dc = wxClientDC(self)
dc.SetFont(self.font)
dc.Clear()
(x,y) = self.GetSizeTuple()
x1 = x-200; y1 = 20
for letter in self.word:
if self.guess.count(letter):
dc.DrawText(letter, x1, y1)
else:
dc.DrawText('.', x1, y1)
x1 = x1 + 10
x1 = x-200
dc.DrawText("tries %d misses %d" % (self.tries,self.misses),x1,50)
guesses = ""
for letter in self.guess:
guesses = guesses + letter
dc.DrawText("guessed:", x1, 70)
dc.DrawText(guesses[:13], x1+80, 70)
dc.DrawText(guesses[13:], x1+80, 90)
dc.SetUserScale(x/1000.0, y/1000.0)
self.DrawVictim(dc)
def DrawVictim(self, dc):
dc.SetPen(wxPen(wxNamedColour('black'), 20))
dc.DrawLines([(10, 980), (10,900), (700,900), (700,940), (720,940),
(720,980), (900,980)])
dc.DrawLines([(100,900), (100, 100), (300,100)])
dc.DrawLine(100,200,200,100)
if ( self.misses == 0 ): return
dc.SetPen(wxPen(wxNamedColour('blue'), 10))
dc.DrawLine(300,100,300,200)
if ( self.misses == 1 ): return
dc.DrawEllipse(250,200,100,100)
if ( self.misses == 2 ): return
dc.DrawLine(300,300,300,600)
if ( self.misses == 3) : return
dc.DrawLine(300,300,250,550)
if ( self.misses == 4) : return
dc.DrawLine(300,300,350,550)
if ( self.misses == 5) : return
dc.DrawLine(300,600,350,850)
if ( self.misses == 6) : return
dc.DrawLine(300,600,250,850)
def OnPaint(self, event):
dc = wxPaintDC(self)
self.Draw(dc)
class HangmanDemo(HangmanWnd):
def __init__(self, wf, parent, id, pos, size):
HangmanWnd.__init__(self, parent, id, pos, size)
self.StartGame("dummy")
self.start_new = 1
self.wf = wf
self.delay = 500
self.timer = self.PlayTimer(self.MakeMove)
def MakeMove(self):
self.timer.Stop()
if self.start_new:
self.StartGame(self.wf.Get())
self.start_new = 0
self.left = list('aaaabcdeeeeefghiiiiijklmnnnoooopqrssssttttuuuuvwxyz')
else:
key = self.left[int(random.random()*len(self.left))]
while self.left.count(key): self.left.remove(key)
self.start_new = self.HandleKey(key)
self.timer.Start(self.delay)
def Stop(self):
self.timer.Stop()
class PlayTimer(wxTimer):
def __init__(self,func):
wxTimer.__init__(self)
self.func = func
self.Start(1000)
def Notify(self):
apply(self.func, ())
class HangmanDemoFrame(wxFrame):
def __init__(self, wf, parent, id, pos, size):
wxFrame.__init__(self, parent, id, "Hangman demo", pos, size)
self.demo = HangmanDemo(wf, self, -1, wxDefaultPosition, wxDefaultSize)
def OnCloseWindow(self, event):
self.demo.timer.Stop()
self.Destroy()
class AboutBox(wxDialog):
def __init__(self, parent,wf):
wxDialog.__init__(self, parent, -1, "About Hangman", wxDefaultPosition, wxSize(350,450))
self.wnd = HangmanDemo(wf, self, -1, wxPoint(1,1), wxSize(350,150))
self.static = wxStaticText(self, -1, __doc__, wxPoint(1,160), wxSize(350, 250))
self.button = wxButton(self, 2001, "OK", wxPoint(150,420), wxSize(50,-1))
EVT_BUTTON(self, 2001, self.OnOK)
def OnOK(self, event):
self.wnd.Stop()
self.EndModal(wxID_OK)
class MyFrame(wxFrame):
def __init__(self, parent, wf):
self.wf = wf
wxFrame.__init__(self, parent, -1, "hangman", wxDefaultPosition, wxSize(400,300))
self.wnd = HangmanWnd(self, -1)
menu = wxMenu()
menu.Append(1001, "New")
menu.Append(1002, "End")
menu.AppendSeparator()
menu.Append(1003, "Reset")
menu.Append(1004, "Demo...")
menu.AppendSeparator()
menu.Append(1005, "Exit")
menubar = wxMenuBar()
menubar.Append(menu, "Game")
menu = wxMenu()
#menu.Append(1010, "Internal", "Use internal dictionary", TRUE)
menu.Append(1011, "ASCII File...")
urls = [ 'wxPython home', 'http://alldunn.com/wxPython/main.html',
'slashdot.org', 'http://slashdot.org/',
'cnn.com', 'http://cnn.com',
'The New York Times', 'http://www.nytimes.com',
'De Volkskrant', 'http://www.volkskrant.nl/frameless/25000006.html',
'Gnu GPL', 'http://www.fsf.org/copyleft/gpl.html',
'Bijbel: Genesis', 'http://www.coas.com/bijbel/gn1.htm']
urlmenu = wxMenu()
for item in range(0,len(urls),2):
urlmenu.Append(1020+item/2, urls[item], urls[item+1])
urlmenu.Append(1080, 'Other...', 'Enter an URL')
menu.AppendMenu(1012, 'URL', urlmenu, 'Use a webpage')
menu.Append(1013, 'Dump', 'Write contents to stdout')
menubar.Append(menu, "Dictionary")
self.urls = urls
self.urloffset = 1020
menu = wxMenu()
menu.Append(1090, "About...")
menubar.Append(menu, "Help")
self.SetMenuBar(menubar)
self.CreateStatusBar(2)
EVT_MENU(self, 1001, self.OnGameNew)
EVT_MENU(self, 1002, self.OnGameEnd)
EVT_MENU(self, 1003, self.OnGameReset)
EVT_MENU(self, 1004, self.OnGameDemo)
EVT_MENU(self, 1005, self.OnWindowClose)
EVT_MENU(self, 1011, self.OnDictFile)
EVT_MENU_RANGE(self, 1020, 1020+len(urls)/2, self.OnDictURL)
EVT_MENU(self, 1080, self.OnDictURLSel)
EVT_MENU(self, 1013, self.OnDictDump)
EVT_MENU(self, 1090, self.OnHelpAbout)
EVT_CHAR(self.wnd, self.OnChar)
self.OnGameReset()
def OnGameNew(self, event):
word = self.wf.Get()
self.in_progress = 1
self.SetStatusText("",0)
self.wnd.StartGame(word)
def OnGameEnd(self, event):
self.UpdateAverages(0)
self.in_progress = 0
self.SetStatusText("",0)
self.wnd.EndGame()
def OnGameReset(self, event=None):
self.played = 0
self.won = 0
self.history = []
self.average = 0.0
self.OnGameNew(None)
def OnGameDemo(self, event):
frame = HangmanDemoFrame(self.wf, self, -1, wxDefaultPosition, self.GetSize())
frame.Show(TRUE)
def OnDictFile(self, event):
fd = wxFileDialog(self)
if (self.wf.filename):
fd.SetFilename(self.wf.filename)
if fd.ShowModal() == wxID_OK:
file = fd.GetPath()
self.wf = WordFetcher(file)
def OnDictURL(self, event):
item = (event.GetId() - self.urloffset)*2
print "Trying to open %s at %s" % (self.urls[item], self.urls[item+1])
self.wf = URLWordFetcher(self.urls[item+1])
def OnDictURLSel(self, event):
msg = wxTextEntryDialog(self, "Enter the URL of the dictionary document", "Enter URL")
if msg.ShowModal() == wxID_OK:
url = msg.GetValue()
self.wf = URLWordFetcher(url)
def OnDictDump(self, event):
print self.wf.words
def OnHelpAbout(self, event):
about = AboutBox(self, self.wf)
about.ShowModal()
about.wnd.Stop() # that damn timer won't stop!
def UpdateAverages(self, has_won):
if has_won:
self.won = self.won + 1
self.played = self.played+1
self.history.append(self.wnd.misses) # ugly
total = 0.0
for m in self.history:
total = total + m
self.average = float(total/len(self.history))
def OnChar(self, event):
if not self.in_progress:
#print "new"
self.OnGameNew(None)
return
key = event.KeyCode();
#print key
if key >= ord('A') and key <= ord('Z'):
key = key + ord('a') - ord('A')
key = chr(key)
if key < 'a' or key > 'z':
event.Skip()
return
res = self.wnd.HandleKey(key)
if res == 0:
self.SetStatusText(self.wnd.message)
elif res == 1:
self.UpdateAverages(0)
self.SetStatusText("Too bad, you're dead!",0)
self.in_progress = 0
elif res == 2:
self.in_progress = 0
self.UpdateAverages(1)
self.SetStatusText("Congratulations!",0)
if self.played:
percent = (100.*self.won)/self.played
else:
percent = 0.0
self.SetStatusText("p %d, w %d (%g %%), av %g" % (self.played,self.won, percent, self.average),1)
def OnWindowClose(self, event):
self.Destroy()
class MyApp(wxApp):
def OnInit(self):
if wxPlatform == '__WXGTK__':
defaultfile = "/usr/share/games/hangman-words"
elif wxPlatform == '__WXMSW__':
defaultfile = "c:\\windows\\hardware.txt"
else:
defaultfile = ""
wf = WordFetcher(defaultfile)
frame = MyFrame(NULL, wf)
self.SetTopWindow(frame)
frame.Show(TRUE)
return TRUE
if __name__ == '__main__':
app = MyApp(0)
app.MainLoop()
#----------------------------------------------------------------------
overview = __doc__
def runTest(frame, nb, log):
if wxPlatform == '__WXGTK__' or wxPlatform == '__WXMOTIF__':
defaultfile = "/usr/share/games/hangman-words"
elif wxPlatform == '__WXMSW__':
defaultfile = "c:\\windows\\hardware.txt"
else:
defaultfile = ""
wf = WordFetcher(defaultfile)
win = MyFrame(frame, wf)
frame.otherWin = win
win.Show(true)
#----------------------------------------------------------------------

View File

@@ -0,0 +1,77 @@
from wxPython.wx import *
from wxPython.html import *
import sys
default_page = """
<H1>HTML Viewer</H1>Please select <I>File->Open</I>
to open a HTML file, or edit this page in the
text control below and select <I>File->Update</I>
<P>
The python source can be seen
<a href="%s">here</a>.
""" % (sys.argv[0], )
class HtmlViewer(wxFrame):
def __init__(self, parent, id, title, pos = wxDefaultPosition, size = wxSize(400,400)):
wxFrame.__init__(self, parent, id, title, pos, size)
self.CreateStatusBar(1)
split = wxSplitterWindow(self, -1)
self.html = wxHtmlWindow(split)
self.html.SetRelatedFrame(self, "HTML Viewer: \%s")
self.html.SetRelatedStatusBar(0)
self.txt = wxTextCtrl(split, -1, default_page,
wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE)
split.SplitHorizontally(self.html, self.txt, size.y/2)
mbar = wxMenuBar()
menu = wxMenu()
menu.Append(1500, "Open")
menu.Append(1501, "Reset")
menu.Append(1502, "Update HTML")
menu.AppendSeparator()
menu.Append(1503, "Exit")
mbar.Append(menu, "File")
menu = wxMenu()
menu.Append(1510, "Back")
menu.Append(1511, "Forward")
mbar.Append(menu, "Go")
self.SetMenuBar(mbar)
self.filename = ""
EVT_MENU(self, 1500, self.OnFileOpen)
EVT_MENU(self, 1501, self.OnFileReset)
EVT_MENU(self, 1502, self.OnFileUpdate)
EVT_MENU(self, 1503, self.OnClose)
EVT_MENU(self, 1510, self.OnGoBack)
EVT_MENU(self, 1511, self.OnGoForward)
# A default opening text
self.html.SetPage( default_page )
def OnFileOpen(self, event):
dlg = wxFileDialog(NULL, "Open file")
if dlg.ShowModal() == wxID_OK:
self.filename = dlg.GetPath()
self.html.LoadPage(self.filename)
def OnFileReset(self, event):
self.html.SetPage( default_page )
self.txt.SetValue( default_page )
def OnFileUpdate(self, event):
self.html.SetPage( self.txt.GetValue() )
def OnGoBack(self, event):
self.html.HistoryBack()
def OnGoForward(self, event):
self.html.HistoryForward()
def OnClose(self,event):
self.Destroy()
class MyApp(wxApp):
def OnInit(self):
frame = HtmlViewer(NULL, -1, "HTML Viewer")
frame.Show(TRUE)
self.SetTopWindow(frame)
return TRUE
wxImage_AddHandler(wxPNGHandler())
wxImage_AddHandler(wxGIFHandler())
wxImage_AddHandler(wxJPEGHandler())
theApp = MyApp(0)
theApp.MainLoop()

View File

@@ -0,0 +1,97 @@
from wxPython.wx import *
from wxPython.html import *
import sys,string
# A bunch of simple widgets, all somehow derived from wxWindow
class Widget1(wxWindow):
def __init__(self, parent, param):
wxWindow.__init__(self, parent, -1)
self.text = wxTextCtrl(self, -1, param['param_str'], wxPoint(5,5),
wxSize(200,150), wxTE_MULTILINE)
but = wxButton(self, 1001, "Click me", wxPoint(50,160), wxSize(100,30))
EVT_BUTTON(self, 1001, self.OnButton)
self.SetSize(wxSize(210,200))
def OnButton(self, event):
self.text.AppendText( "Click!\n" )
class Widget2(wxButton):
def __init__(self, parent, param):
wxButton.__init__(self, parent, int(param['id']), param['title'])
class Widget3(wxTextCtrl):
def __init__(self, parent, param):
wxTextCtrl.__init__(self, parent, -1, "No clicks")
self.clicked = 0;
EVT_BUTTON(parent, int(param['button_id']), self.OnButton)
def OnButton(self, event):
self.clicked = self.clicked + 1
self.SetValue("%d clicks" % (self.clicked,))
# make the widgets known in the widget module (aka htmlc)
widget.Widget1 = Widget1
widget.Widget2 = Widget2
widget.Widget3 = Widget3
# our default page
default_page = """
<H2>wxPython widgets go HTML</H2>
A bunch of wxPython widgets are scattered on this HTML page.
Here's one:
<center><python class="Widget1" greeting="Hello World"></center>
<hr>
Here's another:
<center><python class="Widget2" float=70 id=1002 title="Button A"></center>
It should always take up 70% of the page width.
<p>And then there's this, listening to button A:
<python class="Widget3" button_id=1002></p>
"""
# our explanation
apology = """
For some bizarre reason, it takes forever and a day to display the
widgets if they are constructed in the frame's constructor. This
only happens in MSW, wxGTK works fine.
<p>Select <I>File->Show it</I> to draw the widgets."""
default_page = default_page + "The HTML code for this page is\n <pre>" + default_page + "</pre>"
class HtmlViewer(wxFrame):
def __init__(self, parent, id, title, pos = wxDefaultPosition, size = wxSize(400,400)):
wxFrame.__init__(self, parent, id, title, pos, size)
self.CreateStatusBar(1)
self.html = wxHtmlWindow(self)
self.html.SetRelatedFrame(self, "HTML Viewer: \%s")
self.html.SetRelatedStatusBar(0)
mbar = wxMenuBar()
menu = wxMenu()
menu.Append(1500, "Show it")
menu.Append(1503, "Exit")
mbar.Append(menu, "File")
EVT_MENU(self, 1500, self.OnShowIt)
EVT_MENU(self, 1503, self.OnClose)
self.SetMenuBar(mbar)
# change apology below to default_page, if you dare!
self.html.SetPage( default_page )
def OnClose(self,event):
self.Destroy()
def OnShowIt(self,event):
self.html.SetPage( default_page )
# now quickly remove the menu option, to hide that
# other bug; namely that widgets aren't removed when the
# HTML page is.
self.GetMenuBar().Enable(1500, FALSE)
class MyApp(wxApp):
def OnInit(self):
frame = HtmlViewer(NULL, -1, "HTML Viewer")
frame.Show(TRUE)
self.SetTopWindow(frame)
return TRUE
wxImage_AddHandler(wxPNGHandler())
wxImage_AddHandler(wxGIFHandler())
wxImage_AddHandler(wxJPEGHandler())
theApp = MyApp(0)
theApp.MainLoop()

View File

@@ -0,0 +1,85 @@
<?xml version="1.0"?>
<!DOCTYPE gcapaper SYSTEM "gcapap-X.dtd" [
<!ENTITY footprint SYSTEM "footprint.tif" NDATA tiff >
<!ENTITY footprint SYSTEM "footprint.eps" NDATA eps >
<!ENTITY shoes SYSTEM "shoes.tif" NDATA tiff >
<!ENTITY super1 "&#90;">
]>
<gcapaper><front><title>Using SGML to make footprints in the sand
</title><keyword>footprints</keyword><keyword>sand</keyword>
<author><fname>Jane</fname><surname>Doe</surname>
<jobtitle>Empress</jobtitle>
<address><affil>Universe Corporation</affil>
<aline>1 Main Street</aline>
<city>Perfect City</city>
<province>Dorado</province>
<cntry>Neutral</cntry><postcode>999999</postcode>
<phone>+55 555 555 5550</phone>
<fax>+55 555 555 5555</fax>
<email>jane@universe.com</email>
<web>www.universe.com</web>
</address>
<bio><para>Jane Doe is the Empress of the Universe <bibref refloc="jd000"/>, a position to which she has always aspired.</para></bio>
</author>
<author><fname>Fred</fname><surname>Bloggs</surname>
<jobtitle>Designer</jobtitle>
<address><affil>Fred (The Shoe) Bloggs Ltd</affil>
<aline>1 Shoe Lane</aline>
<city>Perfect City</city>
<province>Dorado</province>
<cntry>Neutral</cntry><postcode>999999</postcode>
<phone>+55 555 555 1122</phone>
<fax>+55 555 555 1133</fax>
<email>fred@shoebloggs.com</email>
<web>www.shoebloggs.com</web></address>
<bio><para>Fred has always wanted to create the perfect shoe for making footprints in the sand. Now with SGML and XML, he has been able to document his design.</para></bio>
</author>
<abstract>
<para><keyword>ease</keyword><keyword>documentation</keyword>It's not easy being an Empress of the Universe (<a href="http://www.universe.com"/>), but with the right pair of shoes and the right documentation on how to make footprints in the sand of life, it's easier than it was. Since the introduction of <acronym.grp><acronym>SGML</acronym><expansion>Standard Generalized Markup Language</expansion></acronym.grp> and <acronym.grp><acronym>XML</acronym><expansion>Extensible Markup Language</expansion></acronym.grp> it is now possible to identify and manage the key bits of information on this process.</para>
</abstract>
</front>
<body><section id="jd001"><title>Introduction</title>
<para><keyword>documentation</keyword>Since its inception, the Universe has always had sand, now it has an Empress, a good shoe design, and <acronym>SGML</acronym> / <acronym>XML</acronym> documentation. The time is now ripe for making <highlight style="ital">footprints</highlight> in the sand.</para></section>
<section id="jd002"><title>Footprints - truly a push technology</title><keyword>push</keyword>
<para>One could safely say that making footprints is a push technology. This is even more true when the footprint maker is the Empress of the Universe. </para>
<subsec1 id="jd003"><title>The sands of time</title><keyword>time</keyword>
<para>The 1<super>st</super> think to remember about the Universe is the time/space continuum to which it conforms. This then confuses the sands of time to be something more like the sands of time/space continuum because if you wait on those sands long enough they may be somewhere else - not necessarily because of the time/space continuum but because the winds will <highlight style="ital">push</highlight> them down the beach.</para></subsec1>
<subsec1 id="jd004"><title>Identifying the footprints</title>
<para>In order to truly understand who has walked on the sands and left the footprints, it is important to identify the <keyword>characteristics</keyword>characteristics of the footprint. In the graphic <xref refloc="jd005" type="title"/>, we can see the footprints are large, well shaped, and evenly distributed from front to back and side to side.</para>
<figure id="jd005"><title>Footprint in Sand</title><caption><para>Note the evenly distributed shape and indention</para></caption><graphic figname="footprint"/></figure>
<para>This footprint begs the question, 'What kind of remarkable <keyword>shoe</keyword>shoe could make such a wonderful footprint?'</para>
<table id="t1">
<tgroup cols="2">
<thead><row><entry>Shoe Type</entry><entry>Remarkability Rating</entry></row></thead>
<tbody><row><entry>Acme Shoe</entry><entry>Unremarkable</entry></row>
<row><entry>Budget Shoe</entry><entry>Not worth remarking on</entry></row>
<row><entry>Super Duper Shoe</entry><entry>Absolutely Remarkable</entry></row></tbody>
</tgroup></table></subsec1>
<subsec1 id="jd006"><title>The Shoe What Made the Footprint</title>
<para>The remarkable footprint is made by a combination of a terrific shoe worn on a fantastic foot propelled by a one-of-a-kind Empress. As can be seen in Figure <xref refloc="jd007" type="number"/>, the shoe is worthy of an Empress.</para>
<figure id="jd007"><title>The Terrific Shoe</title><graphic figname="shoes"/></figure>
<para>The design goals of the shoe were:
<randlist style = "bulleted">
<li><para>to minimize time-consuming manual tasks such as shoelace tying;</para></li>
<li><para>to allow different decorations to be placed on the toes; and</para></li>
<li><para>to enforce a good arch.</para></li></randlist></para></subsec1></section>
<section id="jd008"><title>Documenting the Shoe</title>
<para>Documenting the shoe was the best part for Fred Bloggs. His superior design could be captured for all time in a neutrally-encoded, content-specific manner. An excerpt from his DTD gives an insight into the type of information he captured in his documentation.</para>
<code.block>&lt;!DOCTYPE shoedoc [
&lt;!ELEMENT shoedoc - - (design, mfg, care, recycle) >
&lt;!ATTLIST shoedoc designer CDATA #REQUIRED
date CDATA #REQUIRED>
&lt;!ELEMENT design - - (specs, desc) >
etc.
</code.block>
<para>An excerpt from the documentation also gives us insights.</para>
<code.block><![CDATA[<design>
<specs sizerange="4-12" widthrange="aa-d" color="navy black white red taupe">
<para>The arch shall be high. The toe shall be narrow, but not pinch. The heel shall not come off in grates. Sand shall not get in.</para></specs>]]>
</code.block>
</section></body>
<rear><acknowl>
<para>The authors wish to express our thanks to the Universe for being there and to gravity for holding the sand down long enough to see the footprints.</para></acknowl>
<bibliog>
<bibitem id="jd000"><bib>Barrett 00</bib><pub>Barrett, B., Being Empress Made Easy, Galaxy Division of Universal Publishers. 0000</pub></bibitem></bibliog></rear></gcapaper>

View File

@@ -0,0 +1,211 @@
"""
Hello, and welcome to this test of the wxTreeItemData
class.
The wxTreeItemData class can be used to associate a python
object with a wxTreeCtrl item. In this sample, its use is
demonstrated via a tree control that shows the contents of a
python namespace according to the standard dir()
command. Every item in the tree has its label taken from the
dir() output, and 'behind it' a reference to the python
object is stored in a wxTreeItemData object.
As you may have guessed by now, this sample automatically
displays '__doc__' strings if the selected python object
happens to have one. Please expand the pyTree object to
learn more about the implementation.
Version 1.0, April 4 1999.
Harm van der Heijden (H.v.d.Heijden@phys.tue.nl)
P.S. Check out the string module. It's imported in this
sample not because it's used, but because it's so
beautifully documented...
"""
from wxPython import wx
import string # Don't use it, but it's fun expanding :-)
#----------------------------------------------------------------------
def _getindent(line):
"""Returns the indentation level of the given line."""
indent = 0
for c in line:
if c == ' ': indent = indent + 1
elif c == '\t': indent = indent + 8
else: break
return indent
def _sourcefinder(func):
"""Given a func_code object, this function tries to find and return
the python source code of the function."""
try:
f = open(func.co_filename,"r")
except:
return "(could not open file %s)" % (func.co_filename,)
for i in range(func.co_firstlineno):
line = f.readline()
ind = _getindent(line)
msg = ""
while line:
msg = msg + line
line = f.readline()
# the following should be <= ind, but then we get
# confused by multiline docstrings. Using == works most of
# the time... but not always!
if _getindent(line) == ind: break
return msg
#----------------------------------------------------------------------
class pyTree(wx.wxTreeCtrl):
"""
This wxTreeCtrl derivative displays a tree view of a Python namespace.
Anything from which the dir() command returns a non-empty list is a branch
in this tree.
"""
def __init__(self, parent, id, root):
"""
Initialize function; because we insert branches into the tree
as needed, we use the ITEM_EXPANDING event handler. The
ITEM_COLLAPSED handler removes the stuff afterwards. The
SEL_CHANGED handler attempts to display interesting
information about the selected object.
"""
wx.wxTreeCtrl.__init__(self, parent, id)
self.root = self.AddRoot(str(root), -1, -1, wx.wxTreeItemData(root))
if dir(root):
self.SetItemHasChildren(self.root, wx.TRUE)
wx.EVT_TREE_ITEM_EXPANDING(self, self.GetId(), self.OnItemExpanding)
wx.EVT_TREE_ITEM_COLLAPSED(self, self.GetId(), self.OnItemCollapsed)
wx.EVT_TREE_SEL_CHANGED(self, self.GetId(), self.OnSelChanged)
self.output = None
def SetOutput(self, output):
"""
Set output function (accepts single string). Used to display string
representation of the selected object by OnSelChanged.
"""
self.output = output
def OnItemExpanding(self,event):
"""
The real workhorse of this class. First we retrieve the object
(parent) belonging to the branch that is to be expanded. This
is done by calling GetPyData(parent), which is a short-cut for
GetPyItemData(parent).Get().
Then we get the dir() list of that object. For each item in
this list, a tree item is created with associated
wxTreeItemData referencing the child object. We get this
object using child = getattr(parent, item).
Finally, we check wether the child returns a non-empty dir()
list. If so, it is labeled as 'having children', so that it
may be expanded. When it actually is expanded, this function
will again figure out what the offspring is.
"""
item = event.GetItem()
obj = self.GetPyData( item )
lst = dir(obj)
for key in lst:
new_obj = getattr(obj,key)
new_item = self.AppendItem( item, key, -1, -1,
wx.wxTreeItemData(new_obj) )
if dir(new_obj):
self.SetItemHasChildren(new_item, wx.TRUE)
def OnItemCollapsed(self, event):
"""
We need to remove all children here, otherwise we'll see all
that old rubbish again after the next expansion.
"""
item = event.GetItem()
self.DeleteChildren(item)
def OnSelChanged(self, event):
"""
If an output function is defined, we try to print some
informative, interesting and thought-provoking stuff to it.
If it has a __doc__ string, we print it. If it's a function or
unbound class method, we attempt to find the python source.
"""
if not self.output:
return
obj = self.GetPyData( event.GetItem() )
msg = str(obj)
if hasattr(obj, '__doc__'):
msg = msg+"\n\nDocumentation string:\n\n%s" % ( getattr(obj, '__doc__'),)
# Is it a function?
func = None
if hasattr(obj, "func_code"): # normal function
func = getattr(obj, "func_code")
elif hasattr(obj, "im_func"): # unbound class method
func = getattr(getattr(obj, "im_func"), "func_code")
if func: # if we found one, let's try to print the source
msg = msg+"\n\nFunction source:\n\n" + _sourcefinder(func)
apply(self.output, (msg,))
#----------------------------------------------------------------------
overview = __doc__
def runTest(frame, nb, log):
"""
This method is used by the wxPython Demo Framework for integrating
this demo with the rest.
"""
thisModule = __import__(__name__, globals())
win = wx.wxFrame(frame, -1, "PyTreeItemData Test")
split = wx.wxSplitterWindow(win, -1)
tree = pyTree(split, -1, thisModule)
text = wx.wxTextCtrl(split, -1, "", wx.wxDefaultPosition,
wx.wxDefaultSize, wx.wxTE_MULTILINE)
split.SplitVertically(tree, text, 200)
tree.SetOutput(text.SetValue)
tree.SelectItem(tree.root)
win.SetSize(wx.wxSize(800,500))
frame.otherWin = win
win.Show(1)
#----------------------------------------------------------------------
if __name__ == '__main__':
class MyFrame(wx.wxFrame):
"""Very standard Frame class. Nothing special here!"""
def __init__(self):
"""Make a splitter window; left a tree, right a textctrl. Wow."""
import __main__
wx.wxFrame.__init__(self, wx.NULL, -1, "PyTreeItemData Test",
wx.wxDefaultPosition, wx.wxSize(800,500))
split = wx.wxSplitterWindow(self, -1)
tree = pyTree(split, -1, __main__)
text = wx.wxTextCtrl(split, -1, "", wx.wxDefaultPosition,
wx.wxDefaultSize, wx.wxTE_MULTILINE)
split.SplitVertically(tree, text, 200)
tree.SetOutput(text.SetValue)
tree.SelectItem(tree.root)
class MyApp(wx.wxApp):
"""This class is even less interesting than MyFrame."""
def OnInit(self):
"""OnInit. Boring, boring, boring!"""
frame = MyFrame()
frame.Show(wx.TRUE)
self.SetTopWindow(frame)
return wx.TRUE
app = MyApp(0)
app.MainLoop()

View File

@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE quotations [
<!ELEMENT collection (quotation)*>
<!ELEMENT em (#PCDATA) >
<!ELEMENT foreign (#PCDATA) >
<!ELEMENT cite (#PCDATA) >
<!ELEMENT author (#PCDATA)>
<!ELEMENT source (#PCDATA|cite)*>
<!ELEMENT quotation (#PCDATA|author|source)* >
]>
<collection><quotation>We will perhaps eventually be writing only small modules which are identified by name as they are used to build larger ones, so that devices like indentation, rather than delimiters, might become feasible for expressing local structure in the source language. <source>Donald E. Knuth, "Structured Programming with goto Statements", Computing Surveys, Vol 6 No 4, Dec. 1974</source> </quotation> <quotation> The infinities aren't contagious except in that they often appear that way due to to their large size. <source>Tim Peters on the IEEE 754 floating point standard, 27 Apr 1998</source> </quotation> </collection>

View File

@@ -0,0 +1,47 @@
from wxPython.wx import *
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
wxButton(self, 10, "Hello", wxPoint(20, 20)).SetDefault()
EVT_BUTTON(self, 10, self.OnClick)
wxButton(self, 20, "HELLO AGAIN!", wxPoint(20, 60), wxSize(90, 45))
EVT_BUTTON(self, 20, self.OnClick)
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
wxBitmapButton(self, 30, bmp, wxPoint(140, 20),
wxSize(bmp.GetWidth()+10, bmp.GetHeight()+10))
EVT_BUTTON(self, 30, self.OnClick)
def OnClick(self, event):
self.log.WriteText("Click! (%d)\n" % event.GetId())
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,80 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestCheckBox(wxPanel):
def __init__(self, parent, log):
self.log = log
wxPanel.__init__(self, parent, -1)
wxStaticText(self, -1, "This example uses the wxCheckBox control.",
wxPoint(10, 10))
cID = NewId()
cb1 = wxCheckBox(self, cID, " Apples", wxPoint(65, 40), wxSize(150, 20), wxNO_BORDER)
cb2 = wxCheckBox(self, cID+1, " Oranges", wxPoint(65, 60), wxSize(150, 20), wxNO_BORDER)
cb2.SetValue(true)
cb3 = wxCheckBox(self, cID+2, " Pears", wxPoint(65, 80), wxSize(150, 20), wxNO_BORDER)
EVT_CHECKBOX(self, cID, self.EvtCheckBox)
EVT_CHECKBOX(self, cID+1, self.EvtCheckBox)
EVT_CHECKBOX(self, cID+2, self.EvtCheckBox)
def EvtCheckBox(self, event):
self.log.WriteText('EvtCheckBox: %d\n' % event.Checked())
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestCheckBox(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
A checkbox is a labelled box which is either on (checkmark is visible) or off (no checkmark).
wxCheckBox()
-----------------------
Default constructor.
wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val, const wxString& name = "checkBox")
Constructor, creating and showing a checkbox.
Parameters
-------------------
parent = Parent window. Must not be NULL.
id = Checkbox identifier. A value of -1 indicates a default value.
label = Text to be displayed next to the checkbox.
pos = Checkbox position. If the position (-1, -1) is specified then a default position is chosen.
size = Checkbox size. If the default size (-1, -1) is specified then a default size is chosen.
style = Window style. See wxCheckBox.
validator = Window validator.
name = Window name.
"""

View File

@@ -0,0 +1,53 @@
from wxPython.wx import *
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight', 'nine', 'ten', 'eleven',
'twelve', 'thirteen', 'fourteen']
wxStaticText(self, -1, "This example uses the wxCheckListBox control.",
wxPoint(45, 15))
lb = wxCheckListBox(self, 60, wxPoint(80, 50), wxSize(80, 120),
sampleList)
EVT_LISTBOX(self, 60, self.EvtListBox)
EVT_LISTBOX_DCLICK(self, 60, self.EvtListBoxDClick)
lb.SetSelection(0)
def EvtListBox(self, event):
self.log.WriteText('EvtListBox: %s\n' % event.GetString())
def EvtListBoxDClick(self, event):
self.log.WriteText('EvtListBoxDClick:\n')
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,76 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestChoice(wxPanel):
def __init__(self, parent, log):
self.log = log
wxPanel.__init__(self, parent, -1)
sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight']
wxStaticText(self, -1, "This example uses the wxChoice control.",
wxPoint(15, 10))
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 20))
wxChoice(self, 40, wxPoint(80, 50), wxSize(95, 20), #wxDefaultSize,
sampleList)
EVT_CHOICE(self, 40, self.EvtChoice)
def EvtChoice(self, event):
self.log.WriteText('EvtChoice: %s\n' % event.GetString())
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestChoice(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
A choice item is used to select one of a list of strings. Unlike a listbox, only the selection is visible until the user pulls down the menu of choices.
wxChoice()
-------------------
Default constructor.
wxChoice(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, int n, const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "choice")
Constructor, creating and showing a choice.
Parameters
-------------------
parent = Parent window. Must not be NULL.
id = Window identifier. A value of -1 indicates a default value.
pos = Window position.
size = Window size. If the default size (-1, -1) is specified then the choice is sized appropriately.
n = Number of strings with which to initialise the choice control.
choices = An array of strings with which to initialise the choice control.
style = Window style. See wxChoice.
validator = Window validator.
name = Window name.
"""

View File

@@ -0,0 +1,38 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
data = wxColourData()
data.SetChooseFull(true)
dlg = wxColourDialog(frame, data)
if dlg.ShowModal() == wxID_OK:
data = dlg.GetColourData()
log.WriteText('You selected: %s\n' % str(data.GetColour().Get()))
dlg.Destroy()
#---------------------------------------------------------------------------
overview = """\
This class represents the colour chooser dialog.
wxColourDialog()
------------------------------
wxColourDialog(wxWindow* parent, wxColourData* data = NULL)
Constructor. Pass a parent window, and optionally a pointer to a block of colour data, which will be copied to the colour dialog's colour data.
"""

View File

@@ -0,0 +1,79 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestComboBox(wxPanel):
def __init__(self, parent, log):
self.log = log
wxPanel.__init__(self, parent, -1)
sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight']
wxStaticText(self, -1, "This example uses the wxComboBox control.",
wxPoint(8, 10))
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18))
wxComboBox(self, 500, "default value", wxPoint(80, 50), wxSize(95, -1),
sampleList, wxCB_DROPDOWN)
EVT_COMBOBOX(self, 500, self.EvtComboBox)
def EvtComboBox(self, event):
self.log.WriteText('EvtComboBox: %s\n' % event.GetString())
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestComboBox(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
A combobox is like a combination of an edit control and a listbox. It can be displayed as static list with editable or read-only text field; or a drop-down list with text field; or a drop-down list without a text field.
A combobox permits a single selection only. Combobox items are numbered from zero.
wxComboBox()
-----------------------
Default constructor.
wxComboBox(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n, const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "comboBox")
Constructor, creating and showing a combobox.
Parameters
-------------------
parent = Parent window. Must not be NULL.
id = Window identifier. A value of -1 indicates a default value.
pos = Window position.
size = Window size. If the default size (-1, -1) is specified then the window is sized appropriately.
n = Number of strings with which to initialise the control.
choices = An array of strings with which to initialise the control.
style = Window style. See wxComboBox.
validator = Window validator.
name = Window name.
"""

View File

@@ -0,0 +1,33 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = wxDialog(frame, -1, "This is a wxDialog", wxDefaultPosition, wxSize(350, 200))
wxStaticText(win, -1, "This is a wxDialog", wxPoint(20, 20))
wxButton(win, wxID_OK, " OK ", wxPoint(75, 120), wxDefaultSize).SetDefault()
wxButton(win, wxID_CANCEL, " Cancel ", wxPoint(200, 120), wxDefaultSize)
val = win.ShowModal()
if val == wxID_OK:
log.WriteText("You pressed OK\n")
else:
log.WriteText("You pressed Cancel\n")
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,53 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
dlg = wxDirDialog(frame)
if dlg.ShowModal() == wxID_OK:
log.WriteText('You selected: %s\n' % dlg.GetPath())
dlg.Destroy()
#---------------------------------------------------------------------------
overview = """\
This class represents the directory chooser dialog.
wxDirDialog()
------------------------
wxDirDialog(wxWindow* parent, const wxString& message = "Choose a directory", const wxString& defaultPath = "", long style = 0, const wxPoint& pos = wxDefaultPosition)
Constructor. Use wxDirDialog::ShowModal to show the dialog.
Parameters
-------------------
parent = Parent window.
message = Message to show on the dialog.
defaultPath = The default path, or the empty string.
style = A dialog style, currently unused.
pos = Dialog position.
"""

View File

@@ -0,0 +1,62 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
dlg = wxFileDialog(frame, "Choose a file", ".", "", "*.*", wxOPEN)
if dlg.ShowModal() == wxID_OK:
log.WriteText('You selected: %s\n' % dlg.GetPath())
dlg.Destroy()
#---------------------------------------------------------------------------
overview = """\
This class represents the file chooser dialog.
wxFileDialog()
----------------------------
wxFileDialog(wxWindow* parent, const wxString& message = "Choose a file", const wxString& defaultDir = ""
, const wxString& defaultFile = "", const wxString& wildcard = "*.*", long style = 0, const wxPoint& pos = wxDefaultPosition)
Constructor. Use wxFileDialog::ShowModal to show the dialog.
Parameters
-------------------
parent = Parent window.
message = Message to show on the dialog.
defaultDir = The default directory, or the empty string.
defaultFile = The default filename, or the empty string.
wildcard = A wildcard, such as "*.*".
style = A dialog style. A bitlist of:
wxOPEN This is an open dialog (Windows only).
wxSAVE This is a save dialog (Windows only).
wxHIDE_READONLY Hide read-only files (Windows only).
wxOVERWRITE_PROMPT Prompt for a conformation if a file will be overridden (Windows only).
pos = Dialog position.
"""

View File

@@ -0,0 +1,39 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
dlg = wxFontDialog(frame)
if dlg.ShowModal() == wxID_OK:
data = dlg.GetFontData()
font = data.GetChosenFont()
log.WriteText('You selected: "%s", %d points, color %s\n' %
(font.GetFaceName(), font.GetPointSize(),
data.GetColour().Get()))
dlg.Destroy()
#---------------------------------------------------------------------------
overview = """\
This class represents the font chooser dialog.
wxFontDialog()
----------------------------
wxFontDialog(wxWindow* parent, wxFontData* data = NULL)
Constructor. Pass a parent window, and optionally a pointer to a block of font data, which will be copied to the font dialog's font data.
"""

View File

@@ -0,0 +1,41 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class MyFrame(wxFrame):
def __init__(self, parent, ID, title, pos, size):
wxFrame.__init__(self, parent, ID, title, pos, size)
panel = wxPanel(self, -1)
button = wxButton(panel, 1003, "Close Me")
button.SetPosition(wxPoint(15, 15))
EVT_BUTTON(self, 1003, self.OnCloseMe)
def OnCloseMe(self, event):
self.Close(true)
def OnCloseWindow(self, event):
self.Destroy()
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = MyFrame(frame, -1, "This is a wxFrame", wxDefaultPosition, wxSize(350, 200))
frame.otherWin = win
win.Show(true)
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,158 @@
from wxPython.wx import *
try:
from wxPython.glcanvas import *
haveGLCanvas = true
except ImportError:
haveGLCanvas = false
#----------------------------------------------------------------------
if not haveGLCanvas:
def runTest(frame, nb, log):
dlg = wxMessageDialog(frame, 'The wxGLCanvas has not been included with this build of wxPython!',
'Sorry', wxOK | wxICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
else:
def runTest(frame, nb, log):
#win = TestGLCanvas(nb)
#return win
win = wxFrame(frame, -1, "GL Cube", wxDefaultPosition, wxSize(400,300))
canvas = TestGLCanvas(win)
frame.otherWin = win
win.Show(true)
return None
class TestGLCanvas(wxGLCanvas):
def __init__(self, parent):
wxGLCanvas.__init__(self, parent, -1)
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
self.init = false
def OnEraseBackground(self, event):
pass # Do nothing, to avoid flashing.
def OnSize(self, event):
size = self.GetClientSize()
if self.GetContext() != 'NULL':
self.SetCurrent()
glViewport(0, 0, size.width, size.height)
def OnPaint(self, event):
dc = wxPaintDC(self)
ctx = self.GetContext()
if ctx == "NULL": return
self.SetCurrent()
if not self.init:
self.InitGL()
self.init = true
# clear color and depth buffers
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
# draw six faces of a cube
glBegin(GL_QUADS)
glNormal3f( 0.0, 0.0, 1.0)
glVertex3f( 0.5, 0.5, 0.5)
glVertex3f(-0.5, 0.5, 0.5)
glVertex3f(-0.5,-0.5, 0.5)
glVertex3f( 0.5,-0.5, 0.5)
glNormal3f( 0.0, 0.0,-1.0)
glVertex3f(-0.5,-0.5,-0.5)
glVertex3f(-0.5, 0.5,-0.5)
glVertex3f( 0.5, 0.5,-0.5)
glVertex3f( 0.5,-0.5,-0.5)
glNormal3f( 0.0, 1.0, 0.0)
glVertex3f( 0.5, 0.5, 0.5)
glVertex3f( 0.5, 0.5,-0.5)
glVertex3f(-0.5, 0.5,-0.5)
glVertex3f(-0.5, 0.5, 0.5)
glNormal3f( 0.0,-1.0, 0.0)
glVertex3f(-0.5,-0.5,-0.5)
glVertex3f( 0.5,-0.5,-0.5)
glVertex3f( 0.5,-0.5, 0.5)
glVertex3f(-0.5,-0.5, 0.5)
glNormal3f( 1.0, 0.0, 0.0)
glVertex3f( 0.5, 0.5, 0.5)
glVertex3f( 0.5,-0.5, 0.5)
glVertex3f( 0.5,-0.5,-0.5)
glVertex3f( 0.5, 0.5,-0.5)
glNormal3f(-1.0, 0.0, 0.0)
glVertex3f(-0.5,-0.5,-0.5)
glVertex3f(-0.5,-0.5, 0.5)
glVertex3f(-0.5, 0.5, 0.5)
glVertex3f(-0.5, 0.5,-0.5)
glEnd()
self.SwapBuffers()
def InitGL(self):
# set viewing projection
glMatrixMode(GL_PROJECTION);
glFrustum(-0.5, 0.5, -0.5, 0.5, 1.0, 3.0);
# position viewer
glMatrixMode(GL_MODELVIEW);
glTranslatef(0.0, 0.0, -2.0);
# position object
glRotatef(30.0, 1.0, 0.0, 0.0);
glRotatef(30.0, 0.0, 1.0, 0.0);
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
overview = """\
"""
#----------------------------------------------------------------------
def _test():
class MyApp(wxApp):
def OnInit(self):
frame = wxFrame(NULL, -1, "GL Cube", wxDefaultPosition, wxSize(400,300))
win = TestGLCanvas(frame)
frame.Show(TRUE)
self.SetTopWindow(frame)
return TRUE
app = MyApp(0)
app.MainLoop()
if __name__ == '__main__':
_test()

View File

@@ -0,0 +1,55 @@
from wxPython.wx import *
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
self.count = 0
wxStaticText(self, -1, "This example uses the wxGauge control.",
wxPoint(45, 15))
#self.g1 = wxGauge(self, -1, 50, wxPoint(40, 50), wxSize(40, 160),
# wxGA_VERTICAL)
#self.g1.SetBezelFace(3)
#self.g1.SetShadowWidth(3)
self.g2 = wxGauge(self, -1, 50, wxPoint(110, 50), wxSize(250, 25),
wxGA_HORIZONTAL)
self.g2.SetBezelFace(5)
self.g2.SetShadowWidth(5)
EVT_IDLE(self, self.IdleHandler)
def IdleHandler(self, event):
self.count = self.count + 1
if self.count >= 50:
self.count = 0
#self.g1.SetValue(self.count)
self.g2.SetValue(self.count)
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,79 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestGrid(wxGrid):
def __init__(self, parent, log):
wxGrid.__init__(self, parent, -1)
self.log = log
self.CreateGrid(16, 16)
self.SetColumnWidth(3, 200)
self.SetRowHeight(4, 45)
self.SetCellValue("First cell", 0, 0)
self.SetCellValue("Another cell", 1, 1)
self.SetCellValue("Yet another cell", 2, 2)
self.SetCellTextFont(wxFont(12, wxROMAN, wxITALIC, wxNORMAL), 0, 0)
self.SetCellTextColour(wxRED, 1, 1)
self.SetCellBackgroundColour(wxCYAN, 2, 2)
self.UpdateDimensions()
self.AdjustScrollbars()
EVT_GRID_SELECT_CELL(self, self.OnSelectCell)
EVT_GRID_CELL_CHANGE(self, self.OnCellChange)
EVT_GRID_CELL_LCLICK(self, self.OnCellClick)
EVT_GRID_LABEL_LCLICK(self, self.OnLabelClick)
self.SetEditInPlace(true)
#print self.GetCells()
def OnSelectCell(self, event):
self.log.WriteText("OnSelectCell: (%d, %d)\n" % (event.m_row, event.m_col))
def OnCellChange(self, event):
self.log.WriteText("OnCellChange: (%d, %d)\n" % (event.m_row, event.m_col))
def OnCellClick(self, event):
self.log.WriteText("OnCellClick: (%d, %d)\n" % (event.m_row, event.m_col))
def OnLabelClick(self, event):
self.log.WriteText("OnLabelClick: (%d, %d)\n" % (event.m_row, event.m_col))
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestGrid(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
wxGrid is a class for displaying and editing tabular information.
wxGrid()
-----------------
wxGrid(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style=0, const wxString& name="grid")
Constructor. Before using a wxGrid object, you must call CreateGrid to set up the required rows and columns.
"""

View File

@@ -0,0 +1,40 @@
from wxPython.wx import *
#----------------------------------------------------------------------
def runTest(frame, nb, log):
bmp = wxImage('bitmaps/image.bmp', wxBITMAP_TYPE_BMP).ConvertToBitmap()
gif = wxImage('bitmaps/image.gif', wxBITMAP_TYPE_GIF).ConvertToBitmap()
png = wxImage('bitmaps/image.png', wxBITMAP_TYPE_PNG).ConvertToBitmap()
jpg = wxImage('bitmaps/image.jpg', wxBITMAP_TYPE_JPEG).ConvertToBitmap()
panel = wxPanel(nb, -1)
pos = 10
wxStaticBitmap(panel, -1, bmp, wxPoint(10, pos),
wxSize(bmp.GetWidth(), bmp.GetHeight()))
pos = pos + bmp.GetHeight() + 10
wxStaticBitmap(panel, -1, gif, wxPoint(10, pos),
wxSize(gif.GetWidth(), gif.GetHeight()))
pos = pos + gif.GetHeight() + 10
wxStaticBitmap(panel, -1, png, wxPoint(10, pos),
wxSize(png.GetWidth(), png.GetHeight()))
pos = pos + png.GetHeight() + 10
wxStaticBitmap(panel, -1, jpg, wxPoint(10, pos),
wxSize(jpg.GetWidth(), jpg.GetHeight()))
return panel
#----------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,142 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestLayoutConstraints(wxWindow):
def __init__(self, parent):
wxWindow.__init__(self, parent, -1)
self.SetBackgroundColour(wxNamedColour("MEDIUM ORCHID"))
self.SetAutoLayout(true)
EVT_BUTTON(self, 100, self.OnButton)
self.panelA = wxWindow(self, -1, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER)
self.panelA.SetBackgroundColour(wxBLUE)
txt = wxStaticText(self.panelA, -1,
"Resize the window and see\n"
"what happens... Notice that\n"
"there is no OnSize handler.",
wxPoint(5,5), wxSize(-1, 50))
txt.SetBackgroundColour(wxBLUE)
txt.SetForegroundColour(wxWHITE)
lc = wxLayoutConstraints()
lc.top.SameAs(self, wxTop, 10)
lc.left.SameAs(self, wxLeft, 10)
lc.bottom.SameAs(self, wxBottom, 10)
lc.right.PercentOf(self, wxRight, 50)
self.panelA.SetConstraints(lc)
self.panelB = wxWindow(self, -1, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER)
self.panelB.SetBackgroundColour(wxRED)
lc = wxLayoutConstraints()
lc.top.SameAs(self, wxTop, 10)
lc.right.SameAs(self, wxRight, 10)
lc.bottom.PercentOf(self, wxBottom, 30)
lc.left.RightOf(self.panelA, 10)
self.panelB.SetConstraints(lc)
self.panelC = wxWindow(self, -1, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER)
self.panelC.SetBackgroundColour(wxWHITE)
lc = wxLayoutConstraints()
lc.top.Below(self.panelB, 10)
lc.right.SameAs(self, wxRight, 10)
lc.bottom.SameAs(self, wxBottom, 10)
lc.left.RightOf(self.panelA, 10)
self.panelC.SetConstraints(lc)
b = wxButton(self.panelA, 100, ' Panel A ')
lc = wxLayoutConstraints()
lc.centreX.SameAs (self.panelA, wxCentreX)
lc.centreY.SameAs (self.panelA, wxCentreY)
lc.height.AsIs ()
lc.width.PercentOf (self.panelA, wxWidth, 50)
b.SetConstraints(lc);
b = wxButton(self.panelB, 100, ' Panel B ')
lc = wxLayoutConstraints()
lc.top.SameAs (self.panelB, wxTop, 2)
lc.right.SameAs (self.panelB, wxRight, 4)
lc.height.AsIs ()
lc.width.AsIs ()
b.SetConstraints(lc);
self.panelD = wxWindow(self.panelC, -1, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER)
self.panelD.SetBackgroundColour(wxGREEN)
wxStaticText(self.panelD, -1, "Panel D", wxPoint(4, 4)).SetBackgroundColour(wxGREEN)
b = wxButton(self.panelC, 100, ' Panel C ')
lc = wxLayoutConstraints()
lc.top.Below (self.panelD)
lc.left.RightOf (self.panelD)
lc.height.AsIs ()
lc.width.AsIs ()
b.SetConstraints(lc);
lc = wxLayoutConstraints()
lc.bottom.PercentOf (self.panelC, wxHeight, 50)
lc.right.PercentOf (self.panelC, wxWidth, 50)
lc.height.SameAs (b, wxHeight)
lc.width.SameAs (b, wxWidth)
self.panelD.SetConstraints(lc);
def OnButton(self, event):
wxBell()
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestLayoutConstraints(nb)
return win
#---------------------------------------------------------------------------
overview = """\
Objects of this class can be associated with a window to define its layout constraints, with respect to siblings or its parent.
The class consists of the following eight constraints of class wxIndividualLayoutConstraint, some or all of which should be accessed directly to set the appropriate constraints.
left: represents the left hand edge of the window
right: represents the right hand edge of the window
top: represents the top edge of the window
bottom: represents the bottom edge of the window
width: represents the width of the window
height: represents the height of the window
centreX: represents the horizontal centre point of the window
centreY: represents the vertical centre point of the window
Most constraints are initially set to have the relationship wxUnconstrained, which means that their values should be calculated by looking at known constraints. The exceptions are width and height, which are set to wxAsIs to ensure that if the user does not specify a constraint, the existing width and height will be used, to be compatible with panel items which often have take a default size. If the constraint is wxAsIs, the dimension will not be changed.
wxLayoutConstraints()
-------------------------------------------
Constructor.
"""

View File

@@ -0,0 +1,102 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestListBox(wxPanel):
def __init__(self, parent, log):
self.log = log
wxPanel.__init__(self, parent, -1)
sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight', 'nine', 'ten', 'eleven',
'twelve', 'thirteen', 'fourteen']
wxStaticText(self, -1, "This example uses the wxListBox control.",
wxPoint(45, 10))
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(65, 18))
self.lb1 = wxListBox(self, 60, wxPoint(80, 50), wxSize(80, 120),
sampleList, wxLB_SINGLE)
EVT_LISTBOX(self, 60, self.EvtListBox)
EVT_LISTBOX_DCLICK(self, 60, self.EvtListBoxDClick)
EVT_RIGHT_UP(self.lb1, self.EvtRightButton)
self.lb1.SetSelection(0)
wxStaticText(self, -1, "Select many:", wxPoint(200, 50), wxSize(65, 18))
self.lb2 = wxListBox(self, 70, wxPoint(280, 50), wxSize(80, 120),
sampleList, wxLB_EXTENDED)
EVT_LISTBOX(self, 70, self.EvtMultiListBox)
EVT_LISTBOX_DCLICK(self, 70, self.EvtListBoxDClick)
self.lb2.SetSelection(0)
def EvtListBox(self, event):
self.log.WriteText('EvtListBox: %s\n' % event.GetString())
def EvtListBoxDClick(self, event):
self.log.WriteText('EvtListBoxDClick: %s\n' % self.lb1.GetSelection())
def EvtMultiListBox(self, event):
self.log.WriteText('EvtMultiListBox: %s\n' % str(self.lb2.GetSelections()))
def EvtRightButton(self, event):
self.log.WriteText('EvtRightButton: %s\n' % event.GetPosition())
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestListBox(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
A listbox is used to select one or more of a list of strings. The strings are displayed in a scrolling box, with the selected string(s) marked in reverse video. A listbox can be single selection (if an item is selected, the previous selection is removed) or multiple selection (clicking an item toggles the item on or off independently of other selections).
List box elements are numbered from zero.
wxListBox()
---------------------
Default constructor.
wxListBox(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "listBox")
Constructor, creating and showing a list box.
Parameters
-------------------
parent = Parent window. Must not be NULL.
id = Window identifier. A value of -1 indicates a default value.
pos = Window position.
size = Window size. If the default size (-1, -1) is specified then the window is sized appropriately.
n = Number of strings with which to initialise the control.
choices = An array of strings with which to initialise the control.
style = Window style. See wxListBox.
validator = Window validator.
name = Window name.
"""

View File

@@ -0,0 +1,169 @@
#!/bin/env python
#----------------------------------------------------------------------------
# Name: ListCtrl.py
# Purpose: Testing lots of stuff, controls, window types, etc.
#
# Author: Robin Dunn & Gary Dumer
#
# Created:
# RCS-ID: $Id$
# Copyright: (c) 1998 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestListCtrlPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
tID = NewId()
self.il = wxImageList(16, 16)
idx1 = self.il.Add(wxNoRefBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP))
self.list = wxListCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
wxLC_REPORT|wxSUNKEN_BORDER)
self.list.SetImageList(self.il, wxIMAGE_LIST_SMALL)
self.list.SetToolTip(wxToolTip("This is a ToolTip!"))
wxToolTip_Enable(true)
self.list.InsertColumn(0, "Column 0")
self.list.InsertColumn(1, "Column 1")
self.list.InsertColumn(2, "One More Column (2)")
for x in range(50):
self.list.InsertImageStringItem(x, "This is item %d" % x, idx1)
self.list.SetStringItem(x, 1, "Col 1, item %d" % x)
self.list.SetStringItem(x, 2, "item %d in column 2" % x)
self.list.SetColumnWidth(0, wxLIST_AUTOSIZE)
self.list.SetColumnWidth(1, wxLIST_AUTOSIZE)
self.list.SetColumnWidth(2, wxLIST_AUTOSIZE)
self.list.SetItemState(5, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)
self.currentItem = 0
EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected)
EVT_LIST_DELETE_ITEM(self, tID, self.OnItemDelete)
EVT_LEFT_DCLICK(self.list, self.OnDoubleClick)
EVT_RIGHT_DOWN(self.list, self.OnRightDown)
# for wxMSW
EVT_COMMAND_RIGHT_CLICK(self.list, tID, self.OnRightClick)
# for wxGTK
EVT_RIGHT_UP(self.list, self.OnRightClick)
def OnRightDown(self, event):
self.x = event.GetX()
self.y = event.GetY()
self.log.WriteText("x, y = %s\n" % str((self.x, self.y)))
event.Skip()
def OnItemSelected(self, event):
self.currentItem = event.m_itemIndex
self.log.WriteText("OnItemSelected: %s\n" % self.list.GetItemText(self.currentItem))
def OnItemDelete(self, event):
self.log.WriteText("OnItemDelete\n")
def OnDoubleClick(self, event):
self.log.WriteText("OnDoubleClick item %s\n" % self.list.GetItemText(self.currentItem))
def OnRightClick(self, event):
self.log.WriteText("OnRightClick %s\n" % self.list.GetItemText(self.currentItem))
self.menu = wxMenu()
tPopupID1 = 0
tPopupID2 = 1
tPopupID3 = 2
tPopupID4 = 3
self.menu.Append(tPopupID1, "One")
self.menu.Append(tPopupID2, "Two")
self.menu.Append(tPopupID3, "Three")
self.menu.Append(tPopupID4, "DeleteAllItems")
EVT_MENU(self, tPopupID1, self.OnPopupOne)
EVT_MENU(self, tPopupID2, self.OnPopupTwo)
EVT_MENU(self, tPopupID3, self.OnPopupThree)
EVT_MENU(self, tPopupID4, self.OnPopupFour)
self.PopupMenu(self.menu, wxPoint(self.x, self.y))
def OnPopupOne(self, event):
self.log.WriteText("Popup one\n")
def OnPopupTwo(self, event):
self.log.WriteText("Popup two\n")
def OnPopupThree(self, event):
self.log.WriteText("Popup three\n")
def OnPopupFour(self, event):
self.list.DeleteAllItems()
def OnSize(self, event):
w,h = self.GetClientSizeTuple()
self.list.SetDimensions(0, 0, w, h)
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestListCtrlPanel(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
A list control presents lists in a number of formats: list view, report view, icon view and small icon view. Elements are numbered from zero.
wxListCtrl()
------------------------
Default constructor.
wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
Constructor, creating and showing a list control.
Parameters
-------------------
parent = Parent window. Must not be NULL.
id = Window identifier. A value of -1 indicates a default value.
pos = Window position.
size = Window size. If the default size (-1, -1) is specified then the window is sized appropriately.
style = Window style. See wxListCtrl.
validator = Window validator.
name = Window name.
"""

View File

@@ -0,0 +1,62 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
dlg = wxMessageDialog(frame, 'Hello from Python and wxPython!',
'A Message Box', wxOK | wxICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
#---------------------------------------------------------------------------
overview = """\
wxMessageDialog()
----------------------------------
wxMessageDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Message box", long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition)
Constructor. Use wxMessageDialog::ShowModal to show the dialog.
Parameters
-------------------
parent = Parent window.
message = Message to show on the dialog.
caption = The dialog caption.
style = A dialog style (bitlist) containing flags chosen from the following:
wxOK Show an OK button.
wxCANCEL Show a Cancel button.
wxYES_NO Show Yes and No buttons.
wxCENTRE Centre the message. Not Windows.
wxICON_EXCLAMATION Shows an exclamation mark icon. Windows only.
wxICON_HAND Shows a hand icon. Windows only.
wxICON_QUESTION Shows a question mark icon. Windows only.
wxICON_INFORMATION Shows an information (i) icon. Windows only.
pos = Dialog position.
"""

View File

@@ -0,0 +1,42 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class MyMiniFrame(wxMiniFrame):
def __init__(self, parent, ID, title, pos, size, style):
wxMiniFrame.__init__(self, parent, ID, title, pos, size, style)
panel = wxPanel(self, -1)
button = wxButton(panel, 1003, "Close Me")
button.SetPosition(wxPoint(15, 15))
EVT_BUTTON(self, 1003, self.OnCloseMe)
def OnCloseMe(self, event):
self.Close(true)
def OnCloseWindow(self, event):
self.Destroy()
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = MyMiniFrame(frame, -1, "This is a wxMiniFrame",
wxDefaultPosition, wxSize(200, 200),
wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ)
frame.otherWin = win
win.Show(true)
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,27 @@
from wxPython.wx import *
from wxPython.lib.dialogs import wxMultipleChoiceDialog
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange',
'etc', 'etc..', 'etc...' ]
dlg = wxMultipleChoiceDialog(frame,
"Pick some from\n this list\nblah blah...",
"m.s.d.", lst)
if (dlg.ShowModal() == wxID_OK):
print "Selection:", dlg.GetValue(), " -> ", dlg.GetValueString()
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,84 @@
from wxPython.wx import *
import ColorPanel
#----------------------------------------------------------------------------
def runTest(frame, nb, log):
testWin = wxNotebook(nb, -1)
win = ColorPanel.ColoredPanel(testWin, wxBLUE)
testWin.AddPage(win, "Blue")
st = wxStaticText(win, -1,
"You can put nearly any type of window here!",
wxPoint(10, 10))
st.SetForegroundColour(wxWHITE)
st.SetBackgroundColour(wxBLUE)
win = ColorPanel.ColoredPanel(testWin, wxRED)
testWin.AddPage(win, "Red")
win = ColorPanel.ColoredPanel(testWin, wxGREEN)
testWin.AddPage(win, "Green")
win = ColorPanel.ColoredPanel(testWin, wxCYAN)
testWin.AddPage(win, "Cyan")
win = ColorPanel.ColoredPanel(testWin, wxWHITE)
testWin.AddPage(win, "White")
win = ColorPanel.ColoredPanel(testWin, wxBLACK)
testWin.AddPage(win, "Black")
win = ColorPanel.ColoredPanel(testWin, wxNamedColour('MIDNIGHT BLUE'))
testWin.AddPage(win, "MIDNIGHT BLUE")
win = ColorPanel.ColoredPanel(testWin, wxNamedColour('INDIAN RED'))
testWin.AddPage(win, "INDIAN RED")
return testWin
#----------------------------------------------------------------------------
overview = """\
This class represents a notebook control, which manages multiple windows with associated tabs.
To use the class, create a wxNotebook object and call AddPage or InsertPage, passing a window to be used as the page. Do not explicitly delete the window for a page that is currently managed by wxNotebook.
wxNotebook()
-------------------------
Default constructor.
wxNotebook(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size, long style = 0, const wxString& name = "notebook")
Constructs a notebook control.
Parameters
-------------------
parent = The parent window. Must be non-NULL.
id = The window identifier.
pos = The window position.
size = The window size.
style = The window style. Its value is a bit list of zero or more of wxTC_MULTILINE, wxTC_RIGHTJUSTIFY, wxTC_FIXEDWIDTH and wxTC_OWNERDRAW.
"""

View File

@@ -0,0 +1,33 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
data = wxPageSetupDialogData()
data.SetMarginTopLeft(wxPoint(50,50))
data.SetMarginBottomRight(wxPoint(50,50))
dlg = wxPageSetupDialog(frame, data)
if dlg.ShowModal() == wxID_OK:
data = dlg.GetPageSetupData()
tl = data.GetMarginTopLeft()
br = data.GetMarginBottomRight()
log.WriteText('Margins are: %s %s\n' % (str(tl), str(br)))
dlg.Destroy()
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,39 @@
from wxPython.lib.wxPlotCanvas import *
from wxPython.lib import wxPlotCanvas
#---------------------------------------------------------------------------
def _InitObjects():
# 100 points sin function, plotted as green circles
data1 = 2.*Numeric.pi*Numeric.arange(200)/200.
data1.shape = (100, 2)
data1[:,1] = Numeric.sin(data1[:,0])
markers1 = PolyMarker(data1, color='green', marker='circle',size=1)
# 50 points cos function, plotted as red line
data1 = 2.*Numeric.pi*Numeric.arange(100)/100.
data1.shape = (50,2)
data1[:,1] = Numeric.cos(data1[:,0])
lines = PolyLine(data1, color='red')
# A few more points...
pi = Numeric.pi
markers2 = PolyMarker([(0., 0.), (pi/4., 1.), (pi/2, 0.),
(3.*pi/4., -1)], color='blue',
fillcolor='green', marker='cross')
return PlotGraphics([markers1, lines, markers2])
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = PlotCanvas(nb)
win.draw(_InitObjects(),'automatic','automatic');
return win
overview = wxPlotCanvas.__doc__
#---------------------------------------------------------------------------

View File

@@ -0,0 +1,31 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
data = wxPrintDialogData()
data.EnablePrintToFile(true)
data.EnablePageNumbers(true)
data.EnableSelection(true)
dlg = wxPrintDialog(frame, data)
if dlg.ShowModal() == wxID_OK:
log.WriteText('\n')
dlg.Destroy()
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,38 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
max = 20
dlg = wxProgressDialog("Progress dialog example",
"An informative message",
max,
frame,
wxPD_CAN_ABORT | wxPD_APP_MODAL)
keepGoing = true
count = 0
while keepGoing and count <= max:
count = count + 1
wxSleep(1)
if count == max / 2:
keepGoing = dlg.Update(count, "Half-time!")
else:
keepGoing = dlg.Update(count)
dlg.Destroy()
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,81 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestRadioButtons(wxPanel):
def __init__(self, parent, log):
self.log = log
wxPanel.__init__(self, parent, -1)
sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight']
rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 30), wxDefaultSize,
sampleList, 3, wxRA_SPECIFY_COLS)
EVT_RADIOBOX(self, 30, self.EvtRadioBox)
rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 120), wxDefaultSize,
sampleList, 3, wxRA_SPECIFY_COLS | wxNO_BORDER)
EVT_RADIOBOX(self, 30, self.EvtRadioBox)
def EvtRadioBox(self, event):
self.log.WriteText('EvtRadioBox: %d\n' % event.GetInt())
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestRadioButtons(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
A radio box item is used to select one of number of mutually exclusive choices. It is displayed as a vertical column or horizontal row of labelled buttons.
wxRadioBox()
----------------------
Default constructor.
wxRadioBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "radioBox")
Constructor, creating and showing a radiobox.
Parameters
-------------------
parent = Parent window. Must not be NULL.
id = Window identifier. A value of -1 indicates a default value.
label = Label for the static box surrounding the radio buttons.
pos = Window position. If the position (-1, -1) is specified then a default position is chosen.
size = Window size. If the default size (-1, -1) is specified then a default size is chosen.
n = Number of choices with which to initialize the radiobox.
choices = An array of choices with which to initialize the radiobox.
majorDimension = Specifies the maximum number of rows (if style contains wxRA_SPECIFY_ROWS) or columns (if style contains wxRA_SPECIFY_COLS) for a two-dimensional radiobox.
style = Window style. See wxRadioBox.
validator = Window validator.
name = Window name.
"""

View File

@@ -0,0 +1,152 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestSashWindow(wxPanel):
ID_WINDOW_TOP = 5100
ID_WINDOW_LEFT1 = 5101
ID_WINDOW_LEFT2 = 5102
ID_WINDOW_BOTTOM = 5103
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
EVT_SASH_DRAGGED_RANGE(self, self.ID_WINDOW_TOP,
self.ID_WINDOW_BOTTOM, self.OnSashDrag)
# Create some layout windows
# A window like a toolbar
win = wxSashLayoutWindow(self, self.ID_WINDOW_TOP, wxDefaultPosition,
wxSize(200, 30), wxNO_BORDER|wxSW_3D)
win.SetDefaultSize(wxSize(1000, 30))
win.SetOrientation(wxLAYOUT_HORIZONTAL)
win.SetAlignment(wxLAYOUT_TOP)
win.SetBackgroundColour(wxColour(255, 0, 0))
win.SetSashVisible(wxSASH_BOTTOM, true)
self.topWindow = win
# A window like a statusbar
win = wxSashLayoutWindow(self, self.ID_WINDOW_BOTTOM,
wxDefaultPosition, wxSize(200, 30),
wxNO_BORDER|wxSW_3D)
win.SetDefaultSize(wxSize(1000, 30))
win.SetOrientation(wxLAYOUT_HORIZONTAL)
win.SetAlignment(wxLAYOUT_BOTTOM)
win.SetBackgroundColour(wxColour(0, 0, 255))
win.SetSashVisible(wxSASH_TOP, true)
self.bottomWindow = win
# A window to the left of the client window
win = wxSashLayoutWindow(self, self.ID_WINDOW_LEFT1,
wxDefaultPosition, wxSize(200, 30),
wxNO_BORDER|wxSW_3D)
win.SetDefaultSize(wxSize(120, 1000))
win.SetOrientation(wxLAYOUT_VERTICAL)
win.SetAlignment(wxLAYOUT_LEFT)
win.SetBackgroundColour(wxColour(0, 255, 0))
win.SetSashVisible(wxSASH_RIGHT, TRUE)
win.SetExtraBorderSize(10)
textWindow = wxTextCtrl(win, -1, "", wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE|wxSUNKEN_BORDER)
textWindow.SetValue("A help window")
self.leftWindow1 = win
# Another window to the left of the client window
win = wxSashLayoutWindow(self, self.ID_WINDOW_LEFT2,
wxDefaultPosition, wxSize(200, 30),
wxNO_BORDER|wxSW_3D)
win.SetDefaultSize(wxSize(120, 1000))
win.SetOrientation(wxLAYOUT_VERTICAL)
win.SetAlignment(wxLAYOUT_LEFT)
win.SetBackgroundColour(wxColour(0, 255, 255))
win.SetSashVisible(wxSASH_RIGHT, TRUE)
self.leftWindow2 = win
def OnSashDrag(self, event):
if event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE:
return
eID = event.GetId()
if eID == self.ID_WINDOW_TOP:
self.topWindow.SetDefaultSize(wxSize(1000, event.GetDragRect().height))
elif eID == self.ID_WINDOW_LEFT1:
self.leftWindow1.SetDefaultSize(wxSize(event.GetDragRect().width, 1000))
elif eID == self.ID_WINDOW_LEFT2:
self.leftWindow2.SetDefaultSize(wxSize(event.GetDragRect().width, 1000))
elif eID == self.ID_WINDOW_BOTTOM:
self.bottomWindow.SetDefaultSize(wxSize(1000, event.GetDragRect().height))
wxLayoutAlgorithm().LayoutWindow(self)
def OnSize(self, event):
wxLayoutAlgorithm().LayoutWindow(self)
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestSashWindow(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
wxSashLayoutWindow responds to OnCalculateLayout events generated by wxLayoutAlgorithm. It allows the application to use simple accessors to specify how the window should be laid out, rather than having to respond to events. The fact that the class derives from wxSashWindow allows sashes to be used if required, to allow the windows to be user-resizable.
wxSashLayoutWindow()
-------------------------------------------
Default constructor.
wxSashLayoutWindow(wxSashLayoutWindow* parent, wxSashLayoutWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const wxString& name = "layoutWindow")
Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window.
Parameters
-------------------
parent = Pointer to a parent window.
id = Window identifier. If -1, will automatically create an identifier.
pos = Window position. wxDefaultPosition is (-1, -1) which indicates that wxSashLayoutWindows should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply an actual position.
size = Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows should generate a default size for the window.
style = Window style. For window styles, please see wxSashLayoutWindow.
name = Window name.
"""

View File

@@ -0,0 +1,24 @@
from wxPython.wx import *
from wxPython.lib.dialogs import wxScrolledMessageDialog
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
f = open("Main.py", "r")
msg = f.read()
dlg = wxScrolledMessageDialog(frame, msg, "message test")
dlg.ShowModal()
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,129 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class MyCanvas(wxScrolledWindow):
def __init__(self, parent):
wxScrolledWindow.__init__(self, parent, -1, wxPoint(0, 0), wxPyDefaultSize, wxSUNKEN_BORDER)
self.lines = []
self.maxWidth = 1000
self.maxHeight = 1000
self.SetBackgroundColour(wxNamedColor("WHITE"))
self.Connect(-1, -1, wxEVT_LEFT_DOWN, self.OnLeftButtonEvent)
self.Connect(-1, -1, wxEVT_LEFT_UP, self.OnLeftButtonEvent)
self.Connect(-1, -1, wxEVT_MOTION, self.OnLeftButtonEvent)
self.SetCursor(wxStockCursor(wxCURSOR_PENCIL))
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
self.bmp = bmp
self.SetScrollbars(20, 20, self.maxWidth/20, self.maxHeight/20)
def getWidth(self):
return self.maxWidth
def getHeight(self):
return self.maxHeight
def OnPaint(self, event):
dc = wxPaintDC(self)
self.PrepareDC(dc)
self.DoDrawing(dc)
def DoDrawing(self, dc):
dc.BeginDrawing()
pen1 = wxPen(wxNamedColour('RED'))
dc.SetPen(pen1)
dc.DrawRectangle(5, 5, 50, 50)
dc.SetBrush(wxLIGHT_GREY_BRUSH)
dc.SetPen(wxPen(wxNamedColour('BLUE'), 4))
dc.DrawRectangle(15, 15, 50, 50)
font = wxFont(14, wxSWISS, wxNORMAL, wxNORMAL)
dc.SetFont(font)
dc.SetTextForeground(wxColour(0xFF, 0x20, 0xFF))
te = dc.GetTextExtent("Hello World")
dc.DrawText("Hello World", 60, 65)
dc.SetPen(wxPen(wxNamedColour('VIOLET'), 4))
dc.DrawLine(5, 65+te[1], 60+te[0], 65+te[1])
lst = [(100,110), (150,110), (150,160), (100,160)]
dc.DrawLines(lst, -60)
dc.SetPen(wxGREY_PEN)
dc.DrawPolygon(lst, 75)
dc.SetPen(wxGREEN_PEN)
dc.DrawSpline(lst+[(100,100)])
dc.DrawBitmap(self.bmp, 200, 20)
dc.SetTextForeground(wxColour(0, 0xFF, 0x80))
dc.DrawText("a bitmap", 200, 85)
self.DrawSavedLines(dc)
dc.EndDrawing()
def DrawSavedLines(self, dc):
dc.SetPen(wxPen(wxNamedColour('MEDIUM FOREST GREEN'), 4))
for line in self.lines:
for coords in line:
apply(dc.DrawLine, coords)
def SetXY(self, event):
self.x, self.y = self.ConvertEventCoords(event)
def ConvertEventCoords(self, event):
xView, yView = self.ViewStart()
xDelta, yDelta = self.GetScrollPixelsPerUnit()
return (event.GetX() + (xView * xDelta),
event.GetY() + (yView * yDelta))
def OnLeftButtonEvent(self, event):
if event.LeftDown():
self.SetXY(event)
self.curLine = []
elif event.Dragging():
dc = wxClientDC(self)
self.PrepareDC(dc)
dc.BeginDrawing()
dc.SetPen(wxPen(wxNamedColour('MEDIUM FOREST GREEN'), 4))
coords = (self.x, self.y) + self.ConvertEventCoords(event)
self.curLine.append(coords)
apply(dc.DrawLine, coords)
self.SetXY(event)
dc.EndDrawing()
elif event.LeftUp():
self.lines.append(self.curLine)
self.curLine = []
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = MyCanvas(nb)
return win
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,59 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
dlg = wxSingleChoiceDialog(frame, 'Test Single Choice', 'The Caption',
['zero', 'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight'])
if dlg.ShowModal() == wxID_OK:
log.WriteText('You selected: %s\n' % dlg.GetStringSelection())
dlg.Destroy()
#---------------------------------------------------------------------------
overview = """\
This class represents a dialog that shows a list of strings, and allows the user to select one. Double-clicking on a list item is equivalent to single-clicking and then pressing OK.
wxSingleChoiceDialog()
---------------------------------------------
wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, int n, const wxString* choices, char** clientData = NULL, long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition)
Constructor, taking an array of wxString choices and optional client data.
Parameters
-------------------
parent = Parent window.
message = Message to show on the dialog.
caption = The dialog caption.
n = The number of choices.
choices = An array of strings, or a string list, containing the choices.
style = A dialog style (bitlist) containing flags chosen from the following:
wxOK Show an OK button.
wxCANCEL Show a Cancel button.
wxCENTRE Centre the message. Not Windows.
pos = Dialog position.
"""

View File

@@ -0,0 +1,41 @@
from wxPython.wx import *
import string
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
self.count = 0
wxStaticText(self, -1, "This is a wxSlider.", wxPoint(45, 15))
slider = wxSlider(self, 100, 25, 1, 100, wxPoint(30, 60),
wxSize(250, -1),
wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS )
slider.SetTickFreq(5, 1)
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,49 @@
from wxPython.wx import *
import string
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
self.count = 0
wxStaticText(self, -1, "This example uses the wxSpinButton control.",
wxPoint(45, 15))
self.text = wxTextCtrl(self, -1, "1", wxPoint(30, 50), wxSize(60, -1))
h = self.text.GetSize().height
self.spin = wxSpinButton(self, 20, wxPoint(92, 50), wxSize(h*2, h))
self.spin.SetRange(1, 100)
self.spin.SetValue(1)
EVT_SPIN(self, 20, self.OnSpin)
def OnSpin(self, event):
self.text.SetValue(str(event.GetPosition()))
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,67 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
splitter = wxSplitterWindow(nb, -1)
p1 = wxWindow(splitter, -1)
p1.SetBackgroundColour(wxRED)
wxStaticText(p1, -1, "Panel One", wxPoint(5,5)).SetBackgroundColour(wxRED)
p2 = wxWindow(splitter, -1)
p2.SetBackgroundColour(wxBLUE)
wxStaticText(p2, -1, "Panel Two", wxPoint(5,5)).SetBackgroundColour(wxBLUE)
splitter.SplitVertically(p1, p2)
splitter.SetSashPosition(100)
splitter.SetMinimumPaneSize(20)
return splitter
#---------------------------------------------------------------------------
overview = """\
This class manages up to two subwindows. The current view can be split into two programmatically (perhaps from a menu command), and unsplit either programmatically or via the wxSplitterWindow user interface.
wxSplitterWindow()
-----------------------------------
Default constructor.
wxSplitterWindow(wxWindow* parent, wxWindowID id, int x, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style=wxSP_3D, const wxString& name = "splitterWindow")
Constructor for creating the window.
Parameters
-------------------
parent = The parent of the splitter window.
id = The window identifier.
pos = The window position.
size = The window size.
style = The window style. See wxSplitterWindow.
name = The window name.
"""

View File

@@ -0,0 +1,41 @@
from wxPython.wx import *
import string
#----------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
self.count = 0
wxStaticText(self, -1, "This is a wxStaticBitmap.", wxPoint(45, 15))
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
wxStaticBitmap(self, -1, bmp, wxPoint(80, 50),
wxSize(bmp.GetWidth(), bmp.GetHeight()))
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,73 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent):
wxPanel.__init__(self, parent, -1)
wxStaticText(self, -1, "This is an example of static text",
wxPoint(20, 10))
wxStaticText(self, -1, "using the wxStaticText Control.",
wxPoint(20, 30))
wxStaticText(self, -1, "Is this yellow?",
wxPoint(20, 70)).SetBackgroundColour(wxNamedColour('Yellow'))
str = "This is a different font."
text = wxStaticText(self, -1, str, wxPoint(20, 100))
font = wxFont(20, wxSWISS, wxNORMAL, wxNORMAL, false, "Arial")
w, h, d, e = self.GetFullTextExtent(str, font)
text.SetFont(font)
text.SetSize(wxSize(w, h))
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
panel = TestPanel(nb)
return panel
#---------------------------------------------------------------------------
overview = '''\
A static text control displays one or more lines of read-only text.
wxStaticText()
-------------------------
Default constructor.
wxStaticText(wxWindow* parent, wxWindowID id, const wxString& label = "", const wxPoint& pos, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "staticText")
Constructor, creating and showing a text control.
Parameters
-------------------
parent = Parent window. Should not be NULL.
id = Control identifier. A value of -1 denotes a default value.
label = Text label.
pos = Window position.
size = Window size.
style = Window style. See wxStaticText.
name = Window name.
'''
#---------------------------------------------------------------------------

View File

@@ -0,0 +1,114 @@
from wxPython.wx import *
import time
#---------------------------------------------------------------------------
class CustomStatusBar(wxStatusBar):
def __init__(self, parent, log):
wxStatusBar.__init__(self, parent, -1)
self.SetFieldsCount(3)
self.log = log
self.SetStatusText("A Custom StatusBar...", 0)
self.cb = wxCheckBox(self, 1001, "toggle clock")
EVT_CHECKBOX(self, 1001, self.OnToggleClock)
self.cb.SetValue(true)
# figure out how tall to make it.
dc = wxClientDC(self)
dc.SetFont(self.GetFont())
(w,h) = dc.GetTextExtent('X')
h = int(h * 1.8)
self.SetSize(wxSize(100, h))
# start our timer
self.timer = wxPyTimer(self.Notify)
self.timer.Start(1000)
self.Notify()
# Time-out handler
def Notify(self):
t = time.localtime(time.time())
st = time.strftime("%d-%b-%Y %I:%M:%S", t)
self.SetStatusText(st, 2)
self.log.WriteText("tick...\n")
# the checkbox was clicked
def OnToggleClock(self, event):
if self.cb.GetValue():
self.timer.Start(1000)
self.Notify()
else:
self.timer.Stop()
# reposition the checkbox
def OnSize(self, event):
rect = self.GetFieldRect(1)
self.cb.SetPosition(wxPoint(rect.x+2, rect.y+2))
self.cb.SetSize(wxSize(rect.width-4, rect.height-4))
class TestCustomStatusBar(wxFrame):
def __init__(self, parent, log):
wxFrame.__init__(self, parent, -1, 'Test Custom StatusBar',
wxPoint(0,0), wxSize(500, 300))
wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE"))
self.sb = CustomStatusBar(self, log)
self.SetStatusBar(self.sb)
def OnCloseWindow(self, event):
self.sb.timer.Stop()
del self.sb.timer
self.Destroy()
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestCustomStatusBar(frame, log)
frame.otherWin = win
win.Show(true)
#---------------------------------------------------------------------------
overview = """\
A status bar is a narrow window that can be placed along the bottom of a frame to give small amounts of status information. It can contain one or more fields, one or more of which can be variable length according to the size of the window.
wxStatusBar()
----------------------------
Default constructor.
wxStatusBar(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "statusBar")
Constructor, creating the window.
Parameters
-------------------
parent = The window parent, usually a frame.
id = The window identifier. It may take a value of -1 to indicate a default value.
pos = The window position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxWindows, depending on platform.
size = The window size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxWindows, depending on platform.
style = The window style. See wxStatusBar.
name = The name of the window. This parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual windows.
"""

View File

@@ -0,0 +1,40 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
wxStaticText(self, -1, "wxTextCtrl", wxPoint(5, 25), wxSize(75, 20))
wxTextCtrl(self, 10, "", wxPoint(80, 25), wxSize(150, 20))
EVT_TEXT(self, 10, self.EvtText)
wxStaticText(self, -1, "Passsword", wxPoint(5, 50), wxSize(75, 20))
wxTextCtrl(self, 20, "", wxPoint(80, 50), wxSize(150, 20), wxTE_PASSWORD)
EVT_TEXT(self, 20, self.EvtText)
wxStaticText(self, -1, "Multi-line", wxPoint(5, 75), wxSize(75, 20))
wxTextCtrl(self, 30, "", wxPoint(80, 75), wxSize(200, 150), wxTE_MULTILINE)
EVT_TEXT(self, 30, self.EvtText)
def EvtText(self, event):
self.log.WriteText('EvtText: %s\n' % event.GetString())
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
"""

View File

@@ -0,0 +1,50 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
dlg = wxTextEntryDialog(frame, 'What is your favorite programming language?',
'Duh??', 'Python')
dlg.SetValue("Python is the best!") #### this doesn't work?
if dlg.ShowModal() == wxID_OK:
log.WriteText('You entered: %s\n' % dlg.GetValue())
dlg.Destroy()
#---------------------------------------------------------------------------
overview = """\
This class represents a dialog that requests a one-line text string from the user. It is implemented as a generic wxWindows dialog.
wxTextEntryDialog()
----------------------------------
wxTextEntryDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Please enter text", const wxString& defaultValue = "", long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition)
Constructor. Use wxTextEntryDialog::ShowModal to show the dialog.
Parameters
-------------------
parent = Parent window.
message = Message to show on the dialog.
defaultValue = The default value, which may be the empty string.
style = A dialog style, specifying the buttons (wxOK, wxCANCEL) and an optional wxCENTRE style.
pos = Dialog position.
"""

View File

@@ -0,0 +1,67 @@
from wxPython.wx import *
import time
#---------------------------------------------------------------------------
class TestTimer(wxTimer):
def __init__(self, log = None):
wxTimer.__init__(self)
self.log = log
def Notify(self):
wxBell()
if self.log:
self.log.WriteText('beep!\n')
#---------------------------------------------------------------------------
_timer = TestTimer()
class TestTimerWin(wxPanel):
def __init__(self, parent, log):
_timer.log = log
wxPanel.__init__(self, parent, -1)
wxStaticText(self, -1, "This is a timer example",
wxPoint(15, 30))
wxButton(self, 11101, ' Start ', wxPoint(15, 75), wxDefaultSize)
wxButton(self, 11102, ' Stop ', wxPoint(115, 75), wxDefaultSize)
EVT_BUTTON(self, 11101, self.OnStart)
EVT_BUTTON(self, 11102, self.OnStop)
def OnStart(self, event):
_timer.Start(1000)
def OnStop(self, event):
_timer.Stop()
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestTimerWin(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
The wxTimer class allows you to execute code at specified intervals. To use it, derive a new class and override the Notify member to perform the required action. Start with Start, stop with Stop, it's as simple as that.
wxTimer()
------------------
Constructor.
"""

View File

@@ -0,0 +1,125 @@
from wxPython.wx import *
#---------------------------------------------------------------------------
class TestToolBar(wxFrame):
def __init__(self, parent, log):
wxFrame.__init__(self, parent, -1, 'Test ToolBar',
wxPoint(0,0), wxSize(500, 300))
self.log = log
wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE"))
tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER)
#tb = wxToolBar(self, -1, wxDefaultPosition, wxDefaultSize,
# wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT)
#self.SetToolBar(tb)
self.CreateStatusBar()
tb.AddTool(10, wxNoRefBitmap('bitmaps/new.bmp', wxBITMAP_TYPE_BMP),
wxNullBitmap, false, -1, -1, "New", "Long help for 'New'")
EVT_TOOL(self, 10, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick)
tb.AddTool(20, wxNoRefBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP),
wxNullBitmap, false, -1, -1, "Open")
EVT_TOOL(self, 20, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 20, self.OnToolRClick)
tb.AddSeparator()
tb.AddTool(30, wxNoRefBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP),
wxNullBitmap, false, -1, -1, "Copy")
EVT_TOOL(self, 30, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 30, self.OnToolRClick)
tb.AddTool(40, wxNoRefBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP),
wxNullBitmap, false, -1, -1, "Paste")
EVT_TOOL(self, 40, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 40, self.OnToolRClick)
tb.AddSeparator()
tb.AddTool(50, wxNoRefBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
wxNullBitmap, true, -1, -1, "Toggle this")
EVT_TOOL(self, 50, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 50, self.OnToolRClick)
tb.AddTool(60, wxNoRefBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
wxNoRefBitmap('bitmaps/tog2.bmp', wxBITMAP_TYPE_BMP),
true, -1, -1, "Toggle with 2 bitmaps")
EVT_TOOL(self, 60, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick)
tb.Realize()
def OnCloseWindow(self, event):
self.Destroy()
def OnToolClick(self, event):
self.log.WriteText("tool %s clicked\n" % event.GetId())
def OnToolRClick(self, event):
self.log.WriteText("tool %s right-clicked\n" % event.GetId())
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestToolBar(frame, log)
frame.otherWin = win
win.Show(true)
#---------------------------------------------------------------------------
overview = """\
The name wxToolBar is defined to be a synonym for one of the following classes:
wxToolBar95 The native Windows 95 toolbar. Used on Windows 95, NT 4 and above.
wxToolBarMSW A Windows implementation. Used on 16-bit Windows.
wxToolBarGTK The GTK toolbar.
wxToolBarSimple A simple implementation, with scrolling. Used on platforms with no native toolbar control, or where scrolling is required.
wxToolBar()
-----------------------
Default constructor.
wxToolBar(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_HORIZONTAL | wxNO_BORDER, const wxString& name = wxPanelNameStr)
Constructs a toolbar.
Parameters
-------------------
parent = Pointer to a parent window.
id = Window identifier. If -1, will automatically create an identifier.
pos = Window position. wxDefaultPosition is (-1, -1) which indicates that wxWindows should generate a default position for the window. If using the wxWindow class directly, supply an actual position.
size = Window size. wxDefaultSize is (-1, -1) which indicates that wxWindows should generate a default size for the window.
style = Window style. See wxToolBar for details.
name = Window name.
"""

View File

@@ -0,0 +1,147 @@
from wxPython.wx import *
import string
#---------------------------------------------------------------------------
class TestTreeCtrlPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
self.log = log
tID = NewId()
self.tree = wxTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)
self.root = self.tree.AddRoot("The Root Item")
for x in range(15):
child = self.tree.AppendItem(self.root, "Item %d" % x)
for y in range(5):
last = self.tree.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)))
for z in range(5):
self.tree.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z))
self.tree.Expand(self.root)
EVT_TREE_ITEM_EXPANDED (self, tID, self.OnItemExpanded)
EVT_TREE_ITEM_COLLAPSED (self, tID, self.OnItemCollapsed)
EVT_TREE_SEL_CHANGED (self, tID, self.OnSelChanged)
EVT_TREE_BEGIN_LABEL_EDIT(self, tID, self.OnBeginEdit)
EVT_TREE_END_LABEL_EDIT (self, tID, self.OnEndEdit)
EVT_LEFT_DCLICK(self.tree, self.OnLeftDClick)
EVT_RIGHT_DOWN(self.tree, self.OnRightClick)
EVT_RIGHT_UP(self.tree, self.OnRightUp)
def OnRightClick(self, event):
(x,y) = event.Position();
item = self.tree.HitTest(wxPoint(x,y))
self.log.WriteText("OnRightClick: %s\n" % self.tree.GetItemText(item))
self.tree.SelectItem(item)
def OnRightUp(self, event):
(x,y) = event.Position();
item = self.tree.HitTest(wxPoint(x,y))
self.log.WriteText("OnRightUp: %s (manually starting label edit)\n"
% self.tree.GetItemText(item))
self.tree.EditLabel(item)
def OnBeginEdit(self, event):
self.log.WriteText("OnBeginEdit\n")
# show how to prevent edit...
if self.tree.GetItemText(event.GetItem()) == "The Root Item":
wxBell()
self.log.WriteText("You can't edit this one...\n")
event.Veto()
def OnEndEdit(self, event):
self.log.WriteText("OnEndEdit\n")
# show how to reject edit, we'll not allow any digits
for x in event.GetLabel():
if x in string.digits:
self.log.WriteText("You can't enter digits...\n")
event.Veto()
return
def OnLeftDClick(self, event):
(x,y) = event.Position();
item = self.tree.HitTest(wxPoint(x,y))
self.log.WriteText("OnLeftDClick: %s\n" % self.tree.GetItemText(item))
def OnSize(self, event):
w,h = self.GetClientSizeTuple()
self.tree.SetDimensions(0, 0, w, h)
def OnItemExpanded(self, event):
item = event.GetItem()
self.log.WriteText("OnItemExpanded: %s\n" % self.tree.GetItemText(item))
def OnItemCollapsed(self, event):
item = event.GetItem()
self.log.WriteText("OnItemCollapsed: %s\n" % self.tree.GetItemText(item))
def OnSelChanged(self, event):
self.item = event.GetItem()
self.log.WriteText("OnSelChanged: %s\n" % self.tree.GetItemText(self.item))
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestTreeCtrlPanel(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
A tree control presents information as a hierarchy, with items that may be expanded to show further items. Items in a tree control are referenced by wxTreeItemId handles.
wxTreeCtrl()
-------------------------
Default constructor.
wxTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
Constructor, creating and showing a tree control.
Parameters
-------------------
parent = Parent window. Must not be NULL.
id = Window identifier. A value of -1 indicates a default value.
pos = Window position.
size = Window size. If the default size (-1, -1) is specified then the window is sized appropriately.
style = Window style. See wxTreeCtrl.
validator = Window validator.
name = Window name.
"""

View File

@@ -0,0 +1,7 @@
*.gz
*.rpm
*.zip
build.pyc
filelist
wxPython.spec
wxp2.wse

View File

@@ -0,0 +1,5 @@
sourcedir : .
builddir : .
rpmdir : .
srcrpmdir : .

767
utils/wxPython/distrib/build.py Executable file
View File

@@ -0,0 +1,767 @@
#!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: build.py
# Purpose: This script is used to build wxPython. It reads a build
# configuration file in the requested project directory and
# based on the contents of the file can build Makefiles for
# unix or win32, and can execute make with various options
# potentially automating the entire build/install/clean process
# from a single command.
#
# Author: Robin Dunn
#
# Created: 18-Aug-1999
# RCS-ID: $Id$
# Copyright: (c) 1999 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
"""
build.py
This script is used to build wxPython. It reads a build configuration
file in the requested project directory and based on the contents of
the file can build Makefiles for unix or win32, and can execute make
with various options potentially automating the entire
build/install/clean process from a single command.
The default action is to build the Makefile and exit.
Options
-C dir CD to dir before doing anything
-B file Use file as the build configuration (default ./build.cfg)
-M file Use file as the name of the makefile to create
(default Makefile)
-b Build the module (runs make)
-i Install the module (runs make install)
-c Cleanup (runs make clean)
-u Uninstall (runs make uninstall)
-h Show help and exit
Configuration Files
The build configuration file lists targets, source files and options
for the the build process. The contents of the build.cfg are used to
dynamically generate the Makefile.
To prevent you from getting screwed when the default build.cfg is
updated, you can override the values in build.cfg by putting your
custom definitions in a file named build.local. You can also place a
build.local file in the parent directory, or even in the grandparent
directory for project-wide overrides. Finally, command-line arguments
of the form NAME=VALUE can also be used to override simple configuration
values. The order of evaluation is:
0. comman-line flags (-M, -b, etc.)
1. ./build.cfg
2. ../../build.local (if present)
3. ../build.local (if present)
4. ./build.local (if present)
5. command-line NAME=VALUEs
The config files are actually just Python files that get exec'ed in a
separate namespace which is then used later as a configuration object.
This keeps the build script simple in that it doesn't have to parse
anything, and the config files can be much more than just names and
values as pretty much any python code can be executed. The global
variables set in the config namespace are what are used later as
configuation values.
Configuration Options
The following variables can be set in the config files. Only a few are
required, the rest will either have suitable defaults or will be
calculated from your current Python runtime environment.
MODULE The name of the extension module to produce
SWIGFILES A list of files that should be run through SWIG
SWIGFLAGS Flags for SWIG
SOURCES Other C/C++ sources that should be part of the module
PYFILES Other Python files that should be installed with the module
CFLAGS Flags to be used by the compiler
LFLAGS Flags to be used at the link step
LIBS Libraries to be linked with
OTHERCFLAGS Extra flags to append to CFLAGS
OTHERLFLAGS Extra flags to append to LFLAGS
OTHERSWIGFLAGS Extra flags to append to SWIGFLAGS
OTHERLIBS Other libraries to be linked with, in addition to LIBS
OTHERTARGETS Other targets to be placed on the default rule line
OTHERINSTALLTARGETS
Other targets to be placed on the install rule line
OTHERRULES This text is placed at the end of the makefile and
will typically be used for adding rules and such
DEFAULTRULE Text to be used for the default rule in the makefile
TARGETDIR Destination for the install step
MAKE The make program to use
MAKEFILE The name of the makefile
runBuild Setting this to 1 is eqivalent to the -b flag
runInstall Setting this to 1 is eqivalent to the -i flag
runClean Setting this to 1 is eqivalent to the -c flag
runUninstall Setting this to 1 is eqivalent to the -u flag
PYVERSION Version number of Python used in pathnames
PYPREFIX The root of the Python install
EXECPREFIX The root of the Python install for binary files
PYTHONLIB The Python link library
"""
import sys, os, string, getopt
#----------------------------------------------------------------------------
# This is really the wxPython version number, and will be placed in the
# Makefiles for use with the distribution related targets.
__version__ = '2.1b3'
#----------------------------------------------------------------------------
def main(args):
try:
opts, args = getopt.getopt(args[1:], 'C:B:M:bicu')
except getopt.error:
usage()
sys.exit(1)
if not os.environ.has_key('WXWIN'):
print "WARNING: WXWIN is not set in the environment. WXDIR may not\n"\
" be set properly in the makefile, you will have to \n"\
" set the environment variable or override in build.local."
bldCfg = 'build.cfg'
bldCfgLocal = 'build.local'
MAKEFILE = 'Makefile'
runBuild = 0
runInstall = 0
runClean = 0
runUninstall = 0
for flag, value in opts:
if flag == '-C': os.chdir(value)
elif flag == '-B': bldCfgFile = value
elif flag == '-M': makefile = value
elif flag == '-b': runBuild = 1
elif flag == '-c': runClean = 1
elif flag == '-i': runInstall = 1
elif flag == '-u': runUninstall = 1
elif flag == '-h': usage(); sys.exit(1)
else: usage(); sys.exit(1)
config = BuildConfig(bldCfg = bldCfg,
bldCfgLocal = bldCfgLocal,
MAKEFILE = MAKEFILE,
runBuild = runBuild,
runInstall = runInstall,
runClean = runClean,
runUninstall = runUninstall)
if config.readConfigFiles(args):
config.doFixups()
config.makeMakefile()
err = 0
if config.runBuild:
cmd = "%s -f %s" % (config.MAKE, config.MAKEFILE)
print "Running:", cmd
err = os.system(cmd)
if not err and config.runInstall:
cmd = "%s -f %s install" % (config.MAKE, config.MAKEFILE)
print "Running:", cmd
err = os.system(cmd)
if not err and config.runClean:
cmd = "%s -f %s clean" % (config.MAKE, config.MAKEFILE)
print "Running:", cmd
err = os.system(cmd)
if not err and config.runUninstall:
cmd = "%s -f %s uninstall" % (config.MAKE, config.MAKEFILE)
print "Running:", cmd
err = os.system(cmd)
#----------------------------------------------------------------------------
def usage():
print __doc__
#----------------------------------------------------------------------------
def swapslash(st):
if sys.platform != 'win32':
st = string.join(string.split(st, '\\'), '/')
return st
#----------------------------------------------------------------------------
def splitlines(st):
return string.join(string.split(string.strip(st), ' '), ' \\\n\t')
#----------------------------------------------------------------------------
class BuildConfig:
def __init__(self, **kw):
self.__dict__.update(kw)
self.setDefaults()
#------------------------------------------------------------
def setDefaults(self):
self.VERSION = __version__
self.MODULE = ''
self.SWIGFILES = []
self.SWIGFLAGS = '-c++ -shadow -python -keyword -dnone -I$(WXPSRCDIR)'
self.SOURCES = []
self.PYFILES = []
self.LFLAGS = ''
self.OTHERCFLAGS = ''
self.OTHERLFLAGS = ''
self.OTHERSWIGFLAGS = ''
self.OTHERLIBS = ''
self.OTHERTARGETS = ''
self.OTHERINSTALLTARGETS = ''
self.OTHERUNINSTALLTARGETS = ''
self.OTHERRULES = ''
self.DEFAULTRULE = 'default: $(GENCODEDIR) $(TARGET)'
self.PYVERSION = sys.version[:3]
self.PYPREFIX = sys.prefix
self.EXECPREFIX = sys.exec_prefix
self.WXDIR = '$(WXWIN)'
self.FINAL = '0'
self.WXP_USE_THREAD = '1'
self.WXUSINGDLL = '1'
self.OTHERDEP = ''
self.WXPSRCDIR = '$(WXDIR)/utils/wxPython/src'
if sys.platform == 'win32':
self.MAKE = 'nmake'
self.PYTHONLIB = '$(PYPREFIX)\\libs\\python15.lib'
self.TARGETDIR = '$(PYPREFIX)\\wxPython'
self.LIBS = '$(PYTHONLIB) $(WXPSRCDIR)\wxc.lib'
self.GENCODEDIR = 'msw'
self.SWIGTOOLKITFLAG = '-D__WXMSW__'
self.OBJEXT = '.obj'
self.TARGET = '$(MODULE).pyd'
self.CFLAGS = '-I$(PYPREFIX)\include -I$(WXPSRCDIR) -I. /Fp$(MODULE).pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H $(THREAD) '
self.LFLAGS = '$(DEBUGLFLAGS) /DLL /subsystem:windows,3.50 /machine:I386 /nologo'
self.RESFILE = ''
self.RESRULE = ''
self.OVERRIDEFLAGS = '/GX-'
self.RMCMD = '-erase '
self.WXPSRCDIR = os.path.normpath(self.WXPSRCDIR)
else:
self.MAKE = 'make'
self.PYLIB = '$(EXECPREFIX)/lib/python$(PYVERSION)'
self.LIBPL = '$(PYLIB)/config'
self.PYTHONLIB = '$(LIBPL)/libpython$(PYVERSION).a'
self.TARGETDIR = '$(EXECPREFIX)/lib/python$(PYVERSION)/site-packages/wxPython'
self.TARGET = '$(MODULE)module$(SO)'
self.OBJEXT = '.o'
self.HELPERLIB = 'wxPyHelpers'
self.HELPERLIBDIR = '/usr/local/lib'
self.CFLAGS = '-DSWIG_GLOBAL -DHAVE_CONFIG_H $(THREAD) -I. '\
'`wx-config --cflags` -I$(PYINCLUDE) -I$(EXECINCLUDE) '\
'-I$(WXPSRCDIR)'
self.LFLAGS = '-L$(WXPSRCDIR) `wx-config --libs`'
self.LIBS = '-l$(HELPERLIB)'
self.RMCMD = '-rm -f '
# **** What to do when I start supporting Motif, etc.???
self.GENCODEDIR = 'gtk'
self.SWIGTOOLKITFLAG = '-D__WXGTK__'
# Extract a few things from Python's Makefile...
try:
filename = os.path.join(self.EXECPREFIX,
'lib/python'+self.PYVERSION,
'config/Makefile')
mfText = string.split(open(filename, 'r').read(), '\n')
except IOError:
raise SystemExit, "Python development files not found"
self.CCC = self.findMFValue(mfText, 'CCC')
self.CC = self.findMFValue(mfText, 'CC')
self.OPT = self.findMFValue(mfText, 'OPT')
self.SO = self.findMFValue(mfText, 'SO')
self.LDSHARED = self.findMFValue(mfText, 'LDSHARED')
self.CCSHARED = self.findMFValue(mfText, 'CCSHARED')
#self.LINKFORSHARED = self.findMFValue(mfText, 'LINKFORSHARED')
#self. = self.findMFValue(mfText, '')
#self. = self.findMFValue(mfText, '')
# The majority of cases will require LDSHARED to be
# modified to use the C++ driver instead of the C driver
# for linking. We'll try to do it here and if we goof up
# then the user can correct it in their build.local file.
self.LDSHARED = string.join(['$(CCC)'] +
string.split(self.LDSHARED, ' ')[1:],
' ')
#------------------------------------------------------------
def doFixups(self):
# This is called after the config files have been evaluated
# so we can do some sanity checking...
if sys.platform != 'win32':
if not self.CCC:
print "Warning: C++ compiler not specified (CCC). Assuming c++"
self.CCC = 'c++'
if not self.CC:
print "Warning: C compiler not specified (CC). Assuming cc"
self.CC = 'cc'
#------------------------------------------------------------
def findMFValue(self, mfText, st):
# Find line begining with st= and return the value
# Regex would probably be to cooler way to do this, but
# I think this is the most understandable.
for line in mfText:
if string.find(line, st+'=') == 0:
st = string.strip(line[len(st)+1:])
return st
return None
#------------------------------------------------------------
def makeMakefile(self):
# make a list of object file names
objects = ""
for name in self.SWIGFILES:
objects = objects + os.path.splitext(name)[0] + self.OBJEXT + ' '
for name in self.SOURCES:
obj = os.path.basename(name)
objects = objects + os.path.splitext(obj)[0] + self.OBJEXT + ' '
self.OBJECTS = splitlines(objects)
# now build the text for the dependencies
depends = ""
for name in self.SWIGFILES:
text = '$(GENCODEDIR)/%s.cpp $(GENCODEDIR)/%s.py : %s.i\n' \
'$(TARGETDIR)\\%s.py : $(GENCODEDIR)\\%s.py\n' % \
tuple([os.path.splitext(name)[0]] * 5)
depends = depends + text
for name in self.PYFILES:
text = '$(TARGETDIR)\\%s.py : %s.py\n' % \
tuple([os.path.splitext(name)[0]] * 2)
depends = depends + text
self.DEPENDS = swapslash(depends)
# and the list of .py files
pymodules = ""
for name in self.SWIGFILES:
pymodules = pymodules + '$(TARGETDIR)\\%s.py ' % os.path.splitext(name)[0]
for name in self.PYFILES:
pymodules = pymodules + '$(TARGETDIR)\\%s.py ' % os.path.splitext(name)[0]
self.PYMODULES = splitlines(swapslash(pymodules))
# now make a list of the python files that would need uninstalled
pycleanup = ""
for name in self.SWIGFILES:
pycleanup = pycleanup + self.makeCleanupList(name)
for name in self.PYFILES:
pycleanup = pycleanup + self.makeCleanupList(name)
self.PYCLEANUP = swapslash(pycleanup)
# finally, build the makefile
if sys.platform == 'win32':
if self.RESFILE:
self.RESFILE = '$(MODULE).res'
self.RESRULE = '$(MODULE).res : $(MODULE).rc $(WXDIR)\\include\\wx\\msw\\wx.rc\n\t'\
'$(rc) -r /i$(WXDIR)\\include -fo$@ $(MODULE).rc'
text = win32Template % self.__dict__
else:
text = unixTemplate % self.__dict__
f = open(self.MAKEFILE, 'w')
f.write(text)
f.close()
print "Makefile created: ", self.MAKEFILE
#------------------------------------------------------------
def makeCleanupList(self, name):
st = ""
st = st + '\t%s$(TARGETDIR)\\%s.py\n' % (self.RMCMD, os.path.splitext(name)[0])
st = st + '\t%s$(TARGETDIR)\\%s.pyc\n' % (self.RMCMD, os.path.splitext(name)[0])
st = st + '\t%s$(TARGETDIR)\\%s.pyo\n' % (self.RMCMD, os.path.splitext(name)[0])
return st
#------------------------------------------------------------
def readConfigFiles(self, args):
return self.processFile(self.bldCfg, 1) and \
self.processFile(os.path.join('../..', self.bldCfgLocal)) and \
self.processFile(os.path.join('..', self.bldCfgLocal)) and \
self.processFile(os.path.join('.', self.bldCfgLocal)) and \
self.processArgs(args)
#------------------------------------------------------------
def processFile(self, filename, required=0):
try:
text = open(filename, 'r').read()
except IOError:
if required:
print "Unable to open %s" % filename
return 0
else:
return 1
try:
exec(text, self.__dict__)
except:
print "Error evaluating %s" % filename
import traceback
traceback.print_exc()
return 0
return 1
#------------------------------------------------------------
def processArgs(self, args):
try:
for st in args:
pair = string.split(st, '=')
name = pair[0]
value = pair[1]
self.__dict__[name] = value
except:
print "Error parsing command-line: %s" % st
return 0
return 1
#------------------------------------------------------------
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
win32Template = '''
#----------------------------------------------------------------------
# This makefile was autogenerated from build.py. Your changes will be
# lost if the generator is run again. You have been warned.
#----------------------------------------------------------------------
WXDIR = %(WXDIR)s
VERSION = %(VERSION)s
MODULE = %(MODULE)s
SWIGFLAGS = %(SWIGFLAGS)s %(SWIGTOOLKITFLAG)s %(OTHERSWIGFLAGS)s
CFLAGS = %(CFLAGS)s
LFLAGS = %(LFLAGS)s
PYVERSION = %(PYVERSION)s
PYPREFIX = %(PYPREFIX)s
EXECPREFIX = %(EXECPREFIX)s
PYTHONLIB = %(PYTHONLIB)s
FINAL = %(FINAL)s
WXP_USE_THREAD = %(WXP_USE_THREAD)s
WXUSINGDLL = %(WXUSINGDLL)s
GENCODEDIR = %(GENCODEDIR)s
RESFILE = %(RESFILE)s
WXPSRCDIR = %(WXPSRCDIR)s
TARGETDIR = %(TARGETDIR)s
OBJECTS = %(OBJECTS)s
PYMODULES = %(PYMODULES)s
TARGET = %(TARGET)s
!if "$(FINAL)" == "0"
DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
!else
DEBUGLFLAGS = /INCREMENTAL:NO
!endif
!if "$(WXP_USE_THREAD)" == "1"
THREAD=-DWXP_USE_THREAD=1
!endif
NOPCH=1
OVERRIDEFLAGS=%(OVERRIDEFLAGS)s
EXTRAFLAGS = $(CFLAGS) %(OTHERCFLAGS)s
LFLAGS = %(LFLAGS)s %(OTHERLFLAGS)s
EXTRALIBS = %(LIBS)s %(OTHERLIBS)s
#----------------------------------------------------------------------
!include $(WXDIR)\\src\\makevc.env
#----------------------------------------------------------------------
%(DEFAULTRULE)s %(OTHERTARGETS)s
install: $(TARGETDIR) $(TARGETDIR)\\$(TARGET) pycfiles %(OTHERINSTALLTARGETS)s
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
-erase *.pch
-erase $(MODULE).exp
-erase $(MODULE).lib
-erase $(MODULE).ilk
-erase $(TARGET)
uninstall: %(OTHERUNINSTALLTARGETS)s
-erase $(TARGETDIR)\\$(TARGET)
%(PYCLEANUP)s
#----------------------------------------------------------------------
# implicit rule for compiling .cpp and .c files
{}.cpp{}.obj:
$(cc) @<<
$(CPPFLAGS) /c /Tp $<
<<
{$(GENCODEDIR)}.cpp{}.obj:
$(cc) @<<
$(CPPFLAGS) /c /Tp $<
<<
{}.c{}.obj:
$(cc) @<<
$(CPPFLAGS) /c $<
<<
.SUFFIXES : .i .py
# Implicit rules to run SWIG
{}.i{$(GENCODEDIR)}.cpp:
swig $(SWIGFLAGS) -c -o $@ $<
{}.i{$(GENCODEDIR)}.py:
swig $(SWIGFLAGS) -c -o $(GENCODEDIR)\\tmp_wrap.cpp $<
-erase $(GENCODEDIR)\\tmp_wrap.cpp
{$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
copy $< $@
{}.py{$(TARGETDIR)}.py:
copy $< $@
#----------------------------------------------------------------------
$(TARGET) : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(RESFILE)
$(link) @<<
/out:$@
$(LFLAGS) /def:$(MODULE).def /implib:./$(MODULE).lib
$(DUMMYOBJ) $(OBJECTS) $(RESFILE)
$(LIBS)
<<
%(RESRULE)s
$(TARGETDIR)\\$(TARGET) : $(TARGET)
copy $(TARGET) $@
pycfiles : $(PYMODULES)
$(EXECPREFIX)\\python $(PYPREFIX)\\Lib\\compileall.py -l $(TARGETDIR)
$(EXECPREFIX)\\python -O $(PYPREFIX)\Lib\\compileall.py -l $(TARGETDIR)
$(TARGETDIR) :
mkdir $(TARGETDIR)
$(GENCODEDIR):
mkdir $(GENCODEDIR)
#----------------------------------------------------------------------
%(DEPENDS)s
#----------------------------------------------------------------------
showflags:
@echo CPPFLAGS:
@echo $(CPPFLAGS)
@echo LFLAGS:
@echo $(LFLAGS)
%(OTHERRULES)s
'''
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
unixTemplate = '''
#----------------------------------------------------------------------
# This makefile was autogenerated from build.py. Your changes will be
# lost if the generator is run again. You have been warned.
#----------------------------------------------------------------------
WXDIR = %(WXDIR)s
VERSION = %(VERSION)s
MODULE = %(MODULE)s
SWIGFLAGS = %(SWIGFLAGS)s %(SWIGTOOLKITFLAG)s %(OTHERSWIGFLAGS)s
CFLAGS = %(CFLAGS)s $(OPT) %(OTHERCFLAGS)s
LFLAGS = %(LFLAGS)s %(OTHERLFLAGS)s
LIBS = %(LIBS)s %(OTHERLIBS)s
PYVERSION = %(PYVERSION)s
PYPREFIX = %(PYPREFIX)s
EXECPREFIX = %(EXECPREFIX)s
PYINCLUDE = $(PYPREFIX)/include/python$(PYVERSION)
EXECINCLUDE = $(EXECPREFIX)/include/python$(PYVERSION)
PYLIB = %(PYLIB)s
LIBPL = %(LIBPL)s
PYTHONLIB = %(PYTHONLIB)s
FINAL = %(FINAL)s
WXP_USE_THREAD = %(WXP_USE_THREAD)s
GENCODEDIR = %(GENCODEDIR)s
WXPSRCDIR = %(WXPSRCDIR)s
HELPERLIB = %(HELPERLIB)s
HELPERLIBDIR = %(HELPERLIBDIR)s
TARGETDIR = %(TARGETDIR)s
CCC = %(CCC)s
CC = %(CC)s
OPT = %(OPT)s
SO = %(SO)s
LDSHARED = %(LDSHARED)s
CCSHARED = %(CCSHARED)s
OBJECTS = %(OBJECTS)s
PYMODULES = %(PYMODULES)s
TARGET = %(TARGET)s
ifeq ($(WXP_USE_THREAD), 1)
THREAD=-DWXP_USE_THREAD
endif
#----------------------------------------------------------------------
%(DEFAULTRULE)s %(OTHERTARGETS)s
install: $(TARGETDIR) $(TARGETDIR)/$(TARGET) pycfiles %(OTHERINSTALLTARGETS)s
clean:
-rm -f *.o *$(SO) *~
-rm -f $(TARGET)
uninstall: %(OTHERUNINSTALLTARGETS)s
-rm -f $(TARGETDIR)/$(TARGET)
%(PYCLEANUP)s
#----------------------------------------------------------------------
%%.o : %%.cpp
$(CCC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $<
%%.o : $(GENCODEDIR)/%%.cpp
$(CCC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $<
%%.o : %%.c
$(CC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $<
%%.o : $(GENCODEDIR)/%%.c
$(CC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $<
$(GENCODEDIR)/%%.cpp : %%.i
swig $(SWIGFLAGS) -c -o $@ $<
$(GENCODEDIR)/%%.py : %%.i
swig $(SWIGFLAGS) -c -o $(GENCODEDIR)/tmp_wrap.cpp $<
rm $(GENCODEDIR)/tmp_wrap.cpp
$(TARGETDIR)/%% : %%
cp -f $< $@
$(TARGETDIR)/%% : $(GENCODEDIR)/%%
cp -f $< $@
#----------------------------------------------------------------------
%(DEPENDS)s
#----------------------------------------------------------------------
$(TARGET) : $(OBJECTS)
$(LDSHARED) $(OBJECTS) $(LFLAGS) $(LIBS) $(OTHERLIBS) -o $(TARGET)
pycfiles : $(PYMODULES)
$(EXECPREFIX)/bin/python $(PYLIB)/compileall.py -l $(TARGETDIR)
$(EXECPREFIX)/bin/python -O $(PYLIB)/compileall.py -l $(TARGETDIR)
$(TARGETDIR) :
mkdir $(TARGETDIR)
$(GENCODEDIR):
mkdir $(GENCODEDIR)
#----------------------------------------------------------------------
%(OTHERRULES)s
'''
#----------------------------------------------------------------------------
if __name__ == '__main__':
main(sys.argv)
#----------------------------------------------------------------------------

32
utils/wxPython/distrib/makerpm Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
if [ -z $1 ]; then
echo "Please specify a version number on the command line."
exit 1
fi
if [ ! -f wxPython.spec.in ]; then
echo "Please run this script from the directory containing the wxPython.spec.in file."
exit 1
fi
strip /usr/lib/python1.5/site-packages/wxPython/*.so
strip /usr/lib/libwxPyHelpers.so
cat wxPython.spec.in | sed s/__VERSION__/$1/g > wxPython.spec
mkdir /usr/doc/wxPython-$1
cp ../README.txt /usr/doc/wxPython-$1
cp ../../../docs/preamble.txt /usr/doc/wxPython-$1
cp ../../../docs/licence.txt /usr/doc/wxPython-$1
cp ../../../docs/licendoc.txt /usr/doc/wxPython-$1
cp ../../../docs/lgpl.txt /usr/doc/wxPython-$1
cp ../../../docs/gpl.txt /usr/doc/wxPython-$1
rpm -bb wxPython.spec
mv /usr/src/redhat/RPMS/*/wxPython*.rpm .
rm -r /usr/doc/wxPython-$1

36
utils/wxPython/distrib/maketgz Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
#----------------------------------------------------------------------
# Make a source distribution as a tar.gz file. This script should be
# run from the directory that holds the wxPython dir (../..) and be
# given a version number as an parameter. The best way to do this is
# run "make dist" in the wxPython/src/ directory.
#----------------------------------------------------------------------
if [ -z $1 ]; then
echo "Please specify a version number on the command line."
exit 1
fi
if [ ! -d wxPython ]; then
echo "Please run this script from the directory containing the wxPython sources."
exit 1
fi
rm -f wxPython/distrib/filelist
for x in `cat wxPython/distrib/wxPython.rsp`; do
ls $x >> wxPython/distrib/filelist
done
tar cf wxPython/distrib/dist-temp.tar -T wxPython/distrib/filelist
cd wxPython/distrib
tar xf dist-temp.tar
rm dist-temp.tar
mv wxPython wxPython-$1
tar cvf wxPython-$1.tar wxPython-$1
gzip wxPython-$1.tar
rm -rf wxPython-$1

View File

@@ -0,0 +1,10 @@
#!/bin/bash
cd ~/wx/utils/wxPython
find . -name "*.py" > filelist
find . -name "*.i" >> filelist
find . -name "*.h" >> filelist
find . -name "*.cpp" >> filelist
cat filelist | zip -r -u -@ xfer.zip

View File

@@ -0,0 +1,9 @@
cd %WXWIN%\utils\wxPython
find . -name "*.py" > filelist
find . -name "*.i" >> filelist
find . -name "*.h" >> filelist
find . -name "*.cpp" >> filelist
cat filelist | zip -r -u -@ xfer.zip

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View File

@@ -0,0 +1,102 @@
wxPython/*.txt
wxPython/demo/*.py
wxPython/demo/bitmaps/*.bmp
wxPython/demo/bitmaps/*.ico
wxPython/demo/bitmaps/*.gif
wxPython/demo/bitmaps/*.png
wxPython/demo/bitmaps/*.jpg
wxPython/demo/README.txt
wxPython/demo/*.xml
wxPython/distrib/build.py
wxPython/lib/*.py
wxPython/lib/*.txt
wxPython/lib/sizers/*.py
wxPython/lib/sizers/*.txt
wxPython/src/build.cfg
wxPython/src/*.i
wxPython/src/*.py
wxPython/src/*.cpp
wxPython/src/*.c
wxPython/src/*.h
wxPython/src/*.ico
wxPython/src/*.def
wxPython/src/*.rc
wxPython/src/msw/*.cpp
wxPython/src/msw/*.h
wxPython/src/msw/*.py
wxPython/src/gtk/*.cpp
wxPython/src/gtk/*.h
wxPython/src/gtk/*.py
wxpython/src/motif/*.cpp
wxPython/src/motif/*.h
wxPython/src/motif/*.py
wxPython/modules/html/build.cfg
wxPython/modules/html/*.i
wxPython/modules/html/*.py
wxPython/modules/html/*.cpp
wxPython/modules/html/*.c
wxPython/modules/html/*.h
wxPython/modules/html/*.def
wxPython/modules/html/*.rc
wxPython/modules/html/msw/*.cpp
wxPython/modules/html/msw/*.h
wxPython/modules/html/msw/*.py
wxPython/modules/html/gtk/*.cpp
wxPython/modules/html/gtk/*.h
wxPython/modules/html/gtk/*.py
wxPython/modules/glcanvas/build.cfg
wxPython/modules/glcanvas/*.i
wxPython/modules/glcanvas/*.py
wxPython/modules/glcanvas/*.cpp
wxPython/modules/glcanvas/*.c
wxPython/modules/glcanvas/*.h
wxPython/modules/glcanvas/*.def
wxPython/modules/glcanvas/*.rc
wxPython/modules/glcanvas/msw/*.cpp
wxPython/modules/glcanvas/msw/*.h
wxPython/modules/glcanvas/msw/*.py
wxPython/modules/glcanvas/gtk/*.cpp
wxPython/modules/glcanvas/gtk/*.h
wxPython/modules/glcanvas/gtk/*.py
wxPython/modules/utils/build.cfg
wxPython/modules/utils/*.i
wxPython/modules/utils/*.py
wxPython/modules/utils/*.cpp
wxPython/modules/utils/*.c
wxPython/modules/utils/*.h
wxPython/modules/utils/*.def
wxPython/modules/utils/*.rc
wxPython/modules/utils/msw/*.cpp
wxPython/modules/utils/msw/*.h
wxPython/modules/utils/msw/*.py
wxPython/modules/utils/gtk/*.cpp
wxPython/modules/utils/gtk/*.h
wxPython/modules/utils/gtk/*.py
wxPython/modules/ogl/build.cfg
wxPython/modules/ogl/*.i
wxPython/modules/ogl/*.py
wxPython/modules/ogl/*.cpp
wxPython/modules/ogl/*.c
wxPython/modules/ogl/*.h
wxPython/modules/ogl/*.def
wxPython/modules/ogl/*.rc
wxPython/modules/ogl/msw/*.cpp
wxPython/modules/ogl/msw/*.h
wxPython/modules/ogl/msw/*.py
wxPython/modules/ogl/gtk/*.cpp
wxPython/modules/ogl/gtk/*.h
wxPython/modules/ogl/gtk/*.py

View File

@@ -0,0 +1,53 @@
Summary: Cross platform GUI toolkit for use with the Python language.
Name: wxPython
Version: __VERSION__
Release: 1
Copyright: wxWindows
Group: Development/Languages/Python
Source: http://alldunn.com/wxPython/wxPython-__VERSION__.tar.gz
Packager: Robin Dunn <robin@alldunn.com>
Vendor: Total Control Software
Requires: python >= 1.5.1
Prefix: /usr/lib/python1.5/site-packages
%description
This Python package consists of an extension module that wraps around the
wxWindows C++ class library and provides a cross platform GUI toolkit for
use with Python. Currently supported platforms are Win32 and Unix/GTK/X.
Python is an interpreted, interactive, object-oriented programming language.
Python combines remarkable power with very clear syntax. It has modules,
classes, exceptions, very high level dynamic data types, and dynamic typing.
There are interfaces to many system calls and libraries, and new built-in
modules are easily written in C or C++. Python is also usable as an
extension language for applications that need a programmable interface.
#%prep
#%setup
#cd wxPython-__VERSION__
#make -f Makefile.pre.in boot
#
#%build
#make
#
#
#%install
#make install
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%doc /usr/doc/wxPython-__VERSION__
/usr/lib/libwxPyHelpers.so
/usr/lib/python1.5/site-packages/wxPython

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,17 @@
@echo off
zip -@ -r wxPython\wxPython-src-%1.zip < wxPython\distrib\wxPython.rsp
mkdir wxPython\docs
copy %WXWIN%\docs\html\wx\*.gif wxPython\docs
copy %WXWIN%\docs\html\wx\*.htm wxPython\docs
copy wxPython\docs\wx.htm wxPython\docs\index.htm
zip -r wxPython\wxPython-docs-%1.zip wxPython\docs
del /y wxPython\docs\*.*
rmdir wxPython\docs
move /R wxPython\*.zip wxPython\distrib

View File

@@ -0,0 +1 @@
*.pyc

View File

@@ -0,0 +1,3 @@

View File

@@ -0,0 +1,107 @@
from wxPython.wx import *
from layoutf import Layoutf
import string
class wxScrolledMessageDialog(wxDialog):
def __init__(self, parent, msg, caption, pos = None, size = None):
if not pos:
pos = wxDefaultPosition
if not size:
size = wxSize(500,300)
wxDialog.__init__(self, parent, -1, caption, pos, size)
text = wxTextCtrl(self, -1, msg, wxDefaultPosition,
wxDefaultSize,
wxTE_MULTILINE | wxTE_READONLY)
ok = wxButton(self, wxID_OK, "OK")
text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok)))
ok.SetConstraints(Layoutf('b=b5#1;x%w50#1;w!80;h!25', (self,)))
self.SetAutoLayout(TRUE)
self.Layout()
class wxMultipleChoiceDialog(wxDialog):
def __init__(self, parent, msg, title, lst, pos = None, size = None):
if not pos:
pos = wxDefaultPosition
if not size:
size = wxSize(200,200)
wxDialog.__init__(self, parent, -1, title, pos, size)
dc = wxClientDC(self)
height = 0
for line in string.split(msg,'\n'):
height = height + dc.GetTextExtent(msg)[1] + 4
stat = wxStaticText(self, -1, msg)
self.lbox = wxListBox(self, 100, wxDefaultPosition,
wxDefaultSize, lst, wxLB_MULTIPLE)
ok = wxButton(self, wxID_OK, "OK")
cancel = wxButton(self, wxID_CANCEL, "Cancel")
stat.SetConstraints(Layoutf('t=t10#1;l=l5#1;r=r5#1;h!%d' % (height,),
(self,)))
self.lbox.SetConstraints(Layoutf('t=b10#2;l=l5#1;r=r5#1;b=t5#3',
(self, stat, ok)))
ok.SetConstraints(Layoutf('b=b5#1;x%w25#1;w!80;h!25', (self,)))
cancel.SetConstraints(Layoutf('b=b5#1;x%w75#1;w!80;h!25', (self,)))
self.SetAutoLayout(TRUE)
self.lst = lst
self.Layout()
def OnSize(self, event):
self.Layout()
def GetValue(self):
return self.lbox.GetSelections()
def GetValueString(self):
sel = self.lbox.GetSelections()
val = []
for i in sel:
val.append(self.lst[i])
return tuple(val)
if __name__ == '__main__':
class MyFrame(wxFrame):
def __init__(self):
wxFrame.__init__(self, NULL, -1, "hello",
wxDefaultPosition, wxSize(200,200))
wxButton(self, 100, "Multiple Test",wxPoint(0,0))
wxButton(self, 101, "Message Test", wxPoint(0,100))
EVT_BUTTON(self, 100, self.OnMultipleTest)
EVT_BUTTON(self, 101, self.OnMessageTest)
def OnMultipleTest(self, event):
self.lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange',
'etc', 'etc..', 'etc...' ]
dlg = wxMultipleChoiceDialog(self,
"Pick some from\n this list\nblabla",
"m.s.d.", self.lst)
if (dlg.ShowModal() == wxID_OK):
print "Selection:", dlg.GetValue(), " -> ", dlg.GetValueString()
def OnMessageTest(self, event):
import sys;
f = open(sys.argv[0],"r")
msg = f.read()
dlg = wxScrolledMessageDialog(self, msg, "message test")
dlg.ShowModal()
class MyApp(wxApp):
def OnInit(self):
frame = MyFrame()
frame.Show(TRUE)
self.SetTopWindow(frame)
return TRUE
app = MyApp(0)
app.MainLoop()

View File

@@ -0,0 +1,262 @@
from wxPython.wx import wxLayoutConstraints,\
wxTop, wxLeft, wxBottom, wxRight, \
wxHeight, wxWidth, wxCentreX, wxCentreY
import re,string
class Layoutf(wxLayoutConstraints):
"""
The class Layoutf(wxLayoutConstraints) presents a simplification
of the wxLayoutConstraints syntax. The name Layoutf is choosen
because of the similarity with C's printf function.
Quick Example:
lc = Layoutf('t=t#1;l=r10#2;r!100;h%h50#1', (self, self.panel))
is equivalent to
lc = wxLayoutContraints()
lc.top.SameAs(self, wxTop)
lc.left.SameAs(self.panel, wxRight, 10)
lc.right.Absolute(100)
lc.height.PercentOf(self, wxHeight, 50)
Usage:
You can give a constraint string to the Layoutf constructor,
or use the 'pack' method. The following are equivalent:
lc = Layoutf('t=t#1;l=r#2;r!100;h%h50#1', (self, self.panel))
and
lc = Layoutf()
lc.pack('t=t#1;l=r#2;r!100;h%h50#1', (self, self.panel))
Besides 'pack' there's also 'debug_pack' which does not set
constraints, but prints traditional wxLayoutConstraint calls to
stdout.
The calls to the Layoutf constructor and pack methods have
the following argument list:
(constraint_string, objects_tuple)
Constraint String syntax:
Constraint directives are separated by semi-colons. You
generally (always?) need four directives to completely describe a
subwindow's location.
A single directive has either of the following forms:
1. <own attribute><compare operation>[numerical argument]
for example r!100 -> lc.right.Absolute(100) )
and w* -> lc.width.AsIs()
2. <own attribute><compare operation>[numerical argument]
#<compare object nr.>
for example t_10#2 (lc.top.Below(<second obj>, 10)
3. <own attribute><compare operation><compare attribute>
[numerical argument]#<compare object nr.>
for example w%h50#2 ( lc.width.PercentOf(<second obj>,
wxHeight, 50) and t=b#1 ( lc.top.SameAs(<first obj>,
wxBottom) )
Which one you need is defined by the <compare operation>
type. The following take type 1 (no object to compare with):
'!': 'Absolute', '?': 'Unconstrained', '*': 'AsIs'
These take type 2 (need to be compared with another object)
'<': 'LeftOf', '>': 'RightOf', '^': 'Above', '_': 'Below'
These take type 3 (need to be compared to another object
attribute)
'=': 'SameAs', '%': 'PercentOf'
For all types, the <own attribute> letter can be any of
't': 'top', 'l': 'left', 'b': 'bottom',
'r': 'right', 'h': 'height', 'w': 'width',
'x': 'centreX', 'y': 'centreY'
If the operation takes an (optional) numerical argument, place it
in [numerical argument]. For type 3 directives, the <compare
attribute> letter can be any of
't': 'wxTop', 'l': 'wxLeft', 'b': 'wxBottom'
'r': 'wxRight', 'h': 'wxHeight', 'w': 'wxWidth',
'x': 'wxCentreX', 'y': 'wxCentreY'
Note that these are the same letters as used for <own attribute>,
so you'll only need to remember one set. Finally, the object
whose attribute is refered to, is specified by #<compare object
nr>, where <compare object nr> is the 1-based (stupid, I know,
but I've gotten used to it) index of the object in the
objects_tuple argument.
Bugs:
Not entirely happy about the logic in the order of arguments
after the <compare operation> character.
Not all wxLayoutConstraint methods are included in the
syntax. However, the type 3 directives are generally the most
used. Further excuse: wxWindows layout constraints are at the
time of this writing not documented.
"""
attr_d = { 't': 'top', 'l': 'left', 'b': 'bottom',
'r': 'right', 'h': 'height', 'w': 'width',
'x': 'centreX', 'y': 'centreY' }
op_d = { '=': 'SameAs', '%': 'PercentOf', '<': 'LeftOf',
'>': 'RightOf', '^': 'Above', '_': 'Below',
'!': 'Absolute', '?': 'Unconstrained', '*': 'AsIs' }
cmp_d = { 't': 'wxTop', 'l': 'wxLeft', 'b': 'wxBottom',
'r': 'wxRight', 'h': 'wxHeight', 'w': 'wxWidth',
'x': 'wxCentreX', 'y': 'wxCentreY' }
rexp1 = re.compile('^\s*([tlrbhwxy])\s*([!\?\*])\s*(\d*)\s*$')
rexp2 = re.compile('^\s*([tlrbhwxy])\s*([=%<>^_])\s*([tlrbhwxy]?)\s*(\d*)\s*#(\d+)\s*$')
def __init__(self,pstr=None,winlist=None):
wxLayoutConstraints.__init__(self)
if pstr:
self.pack(pstr,winlist)
def pack(self, pstr, winlist):
pstr = string.lower(pstr)
for item in string.split(pstr,';'):
m = self.rexp1.match(item)
if m:
g = list(m.groups())
attr = getattr(self, self.attr_d[g[0]])
func = getattr(attr, self.op_d[g[1]])
if g[1] == '!':
func(int(g[2]))
else:
func()
continue
m = self.rexp2.match(item)
if not m: raise ValueError
g = list(m.groups())
attr = getattr(self, self.attr_d[g[0]])
func = getattr(attr, self.op_d[g[1]])
if g[3]: g[3] = int(g[3])
else: g[3] = None;
g[4] = int(g[4]) - 1
if g[1] in '<>^_':
if g[3]: func(winlist[g[4]], g[3])
else: func(winlist[g[4]])
else:
cmp = eval(self.cmp_d[g[2]])
if g[3]: func(winlist[g[4]], cmp, g[3])
else: func(winlist[g[4]], cmp)
def debug_pack(self, pstr, winlist):
pstr = string.lower(pstr)
for item in string.split(pstr,';'):
m = self.rexp1.match(item)
if m:
g = list(m.groups())
attr = getattr(self, self.attr_d[g[0]])
func = getattr(attr, self.op_d[g[1]])
if g[1] == '!':
print "%s.%s.%s(%s)" % \
('self',self.attr_d[g[0]],self.op_d[g[1]],g[2])
else:
print "%s.%s.%s()" % \
('self',self.attr_d[g[0]],self.op_d[g[1]])
continue
m = self.rexp2.match(item)
if not m: raise ValueError
g = list(m.groups())
if g[3]: g[3] = int(g[3])
else: g[3] = 0;
g[4] = int(g[4]) - 1
if g[1] in '<>^_':
if g[3]: print "%s.%s.%s(%s,%d)" % \
('self',self.attr_d[g[0]],self.op_d[g[1]],winlist[g[4]],
g[3])
else: print "%s.%s.%s(%s)" % \
('self',self.attr_d[g[0]],self.op_d[g[1]],winlist[g[4]])
else:
if g[3]: print "%s.%s.%s(%s,%s,%d)" % \
('self',self.attr_d[g[0]],self.op_d[g[1]],winlist[g[4]],
self.cmp_d[g[2]],g[3])
else: print "%s.%s.%s(%s,%s)" % \
('self',self.attr_d[g[0]],self.op_d[g[1]],winlist[g[4]],
self.cmp_d[g[2]])
if __name__=='__main__':
from wxPython.wx import *
class TestLayoutf(wxFrame):
def __init__(self, parent):
wxFrame.__init__(self, parent, -1, 'Test Layout Constraints',
wxPyDefaultPosition, wxSize(500, 300))
self.SetAutoLayout(true)
EVT_BUTTON(self, 100, self.OnButton)
EVT_BUTTON(self, 101, self.OnAbout)
self.panelA = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
self.panelA.SetBackgroundColour(wxBLUE)
self.panelA.SetConstraints(Layoutf('t=t10#1;l=l10#1;b=b10#1;r%r50#1',(self,)))
self.panelB = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
self.panelB.SetBackgroundColour(wxRED)
self.panelB.SetConstraints(Layoutf('t=t10#1;r=r10#1;b%b30#1;l>10#2', (self,self.panelA)))
self.panelC = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
self.panelC.SetBackgroundColour(wxWHITE)
self.panelC.SetConstraints(Layoutf('t_10#3;r=r10#1;b=b10#1;l>10#2', (self,self.panelA,self.panelB)))
b = wxButton(self.panelA, 101, ' About: ')
b.SetConstraints(Layoutf('X=X#1;Y=Y#1;h*;w%w50#1', (self.panelA,)))
b = wxButton(self.panelB, 100, ' Panel B ')
b.SetConstraints(Layoutf('t=t2#1;r=r4#1;h*;w*', (self.panelB,)))
self.panelD = wxWindow(self.panelC, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
self.panelD.SetBackgroundColour(wxGREEN)
self.panelD.SetConstraints(Layoutf('b%h50#1;r%w50#1;h=h#2;w=w#2', (self.panelC, b)))
b = wxButton(self.panelC, 100, ' Panel C ')
b.SetConstraints(Layoutf('t_#1;l>#1;h*;w*', (self.panelD,)))
wxStaticText(self.panelD, -1, "Panel D", wxPoint(4, 4)).SetBackgroundColour(wxGREEN)
def OnButton(self, event):
self.Close(true)
def OnAbout(self, event):
try:
from dialogs import wxScrolledMessageDialog
msg = wxScrolledMessageDialog(self, Layoutf.__doc__, "about")
msg.ShowModal()
except:
print msg
def OnCloseWindow(self, event):
self.Destroy()
class TestApp(wxApp):
def OnInit(self):
frame = TestLayoutf(NULL)
frame.Show(1)
self.SetTopWindow(frame)
return 1
app = TestApp(0)
app.MainLoop()

View File

@@ -0,0 +1,2 @@
*.pyc

View File

@@ -0,0 +1,18 @@
#----------------------------------------------------------------------------
# Name: __init__.py
# Purpose: The presence of this file turns this directory into a
# Python package.
#
# Author: Robin Dunn
#
# Created: 18-May-1999
# RCS-ID: $Id$
# Copyright: (c) 1998 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
from sizer import *
from box import *
from border import *
#----------------------------------------------------------------------------

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