Compare commits

..

634 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
220 changed files with 77865 additions and 45327 deletions

View File

@@ -1,5 +1,9 @@
*.py
*.pyc
*.pyc *.pyc
*.pyd *.pyd
*.pyd
*.pyo
*.pyo *.pyo
*.zip *.zip
.cvsignore .cvsignore
@@ -10,6 +14,7 @@ __init__.pyc
__init__.pyc __init__.pyc
__init__.pyo __init__.pyo
__init__.pyo __init__.pyo
build.local
cmndlgs.py cmndlgs.py
cmndlgs.py cmndlgs.py
cmndlgs.pyc cmndlgs.pyc
@@ -35,6 +40,7 @@ events.pyc
events.pyc events.pyc
events.pyo events.pyo
events.pyo events.pyo
filelist
frames.py frames.py
frames.py frames.py
frames.pyc frames.pyc
@@ -99,6 +105,7 @@ wx.py
wx.pyc wx.pyc
wx.pyc wx.pyc
wx.pyo wx.pyo
wxPython.doc
wxc.ilk wxc.ilk
wxc.pdb wxc.pdb
wxc.pyd wxc.pyd
@@ -108,7 +115,3 @@ wxp.pyo
wxpc.ilk wxpc.ilk
wxpc.pdb wxpc.pdb
wxpc.pyd wxpc.pyd
*.py
*.pyc
*.pyo
*.pyd

View File

@@ -45,6 +45,107 @@ Or you can send mail directly to the list using this address:
---------------------------------------------------------------------- ----------------------------------------------------------------------
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 What's new in 2.1b1
-------------------- --------------------
@@ -232,42 +333,59 @@ me. You don't need SWIG to build the extension module as all the
generated C++ code is included under the src directory. generated C++ code is included under the src directory.
I added a few minor features to SWIG to control some of the code I added a few minor features to SWIG to control some of the code
generation. If you want to playaround with this the patches are in generation. If you want to play around with this you will need to get
wxPython/SWIG.patches and they should be applied to the 1.1p5 version a recent version of SWIG from their CVS or from a daily build. See
of SWIG. These new patches are documented at http://www.swig.org/ for details.
http://starship.skyport.net/crew/robind/#swig, and they should also
end up in the 1.2 version of SWIG.
wxPython is organized as a Python package. This means that the wxPython is organized as a Python package. This means that the
directory containing the results of the build process should be a directory containing the results of the build process should be a
subdirectory of a directory on the PYTHONPATH. (And preferably should subdirectory of a directory on the PYTHONPATH. (And preferably should
be named wxPython.) You can control where the build process will dump be named wxPython.) You can control where the build process will dump
wxPython by setting the TARGETDIR makefile variable. The default is wxPython by setting the TARGETDIR variable for the build utility, (see
$(WXWIN)/utils/wxPython, where this README.txt is located. If you below.)
leave it here then you should add $(WXWIN)/utils to your PYTHONPATH.
However, you may prefer to use something that is already on your
PYTHONPATH, such as the site-packages directory on Unix systems.
Win32 1. Build wxWindows as described in its BuildCVS.txt file. For *nix
----- systems I run configure with these flags:
1. Build wxWindows with wxUSE_RESOURCE_LOADING_IN_MSW set to 1 in --with-gtk
include/wx/msw/setup.h so icons can be loaded dynamically. While --with-libjpeg
there, make sure wxUSE_OWNER_DRAWN is also set to 1. --without-odbc
--enable-unicode=no
--enable-threads=yes
--enable-socket=yes
--enable-static=no
--enable-shared=yes
--disable-std_iostreams
2. Change into the $(WXWIN)/utils/wxPython/src directory. You can use whatever flags you want, but I know these work.
3. Edit makefile.vc and specify where your python installation is at. For Win32 systems I use Visual C++ 6.0, but 5.0 should work. The
You may also want to fiddle with the TARGETDIR variable as described build utility currently does not support any other win32 compilers.
above.
4. Run nmake -f makefile.vc 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:
5. If it builds successfully, congratulations! Move on to the next python $(WXWIN)/utils/wxPython/distrib/build.py %1 %2 %3 %4 %5 %6
step. If not then you can try mailing me for help. Also, I will
always have a pre-built win32 version of this extension module at
http://alldunn.com/wxPython/. 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. 6. Change to the $(WXWIN)/utils/wxPython/demo directory.
@@ -275,44 +393,19 @@ http://alldunn.com/wxPython/.
python demo.py python demo.py
To run it without requiring a console, you can use the pythonw.exe To run it without requiring a console on win32, you can use the
version of Python either from the command line or from a shortcut. pythonw.exe version of Python either from the command line or from a
shortcut.
Unix
----
0. I configure wxWindows like this, YMMV:
./configure --with-gtk --without-shared --with-threads --without-unicode --with-libjpeg
1. Change into the $(WXWIN)/utils/wxPython/src directory.
2. Edit Setup.in and ensure that the flags, directories, and toolkit
options are correct. See the above commentary about TARGETDIR. There
are a few sample Setup.in.[platform] files provided.
3. Run this command to generate a makefile:
make -f Makefile.pre.in boot
4. Run these commands to build and then install the wxPython extension
module:
make
make install
5. Change to the $(WXWIN)/utils/wxPython/demo directory.
6. Try executing the demo program. For example:
python demo.py
---------------- ----------------
Robin Dunn Robin Dunn
robin@alldunn.com robin@alldunn.com

View File

@@ -1,5 +1,5 @@
*** swig.h.old Wed Feb 04 14:59:40 1998 *** swig.h.old Wed Feb 04 15:59:40 1998
--- swig.h Fri Aug 28 14:46:32 1998 --- swig.h Fri Aug 28 15:46:32 1998
*************** ***************
*** 178,185 **** *** 178,185 ****
--- 178,211 ---- --- 178,211 ----
@@ -92,6 +92,48 @@
/*********************************************************************** /***********************************************************************
* -- Revision History * -- Revision History
* $Log$ * $Log$
* Revision 1.1 1998/10/03 05:56:02 RD * Revision 1.2 1999/07/31 07:54:05 RD
* *** empty log message *** * 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

@@ -1,8 +1,9 @@
*** python.cxx.old Fri Jan 02 22:17:40 1998 *** python.cxx.old Fri Jan 02 23:17:40 1998
--- python.cxx Fri Aug 28 14:49:18 1998 --- python.cxx Fri Aug 28 15:49:18 1998
*************** ***************
*** 1679,1684 **** *** 1678,1685 ****
--- 1679,1701 ---- --- 1678,1702 ----
fprintf(stderr,"%s : Line %d. Unable to locate file %s\n", input_file, line_number, value);
} }
} }
} }
@@ -26,11 +27,13 @@
} else { } else {
fprintf(stderr,"%s : Line %d. Unrecognized pragma.\n", input_file, line_number); fprintf(stderr,"%s : Line %d. Unrecognized pragma.\n", input_file, line_number);
} }
*** python.h.old Thu Jul 24 22:18:50 1997 }
--- python.h Fri Aug 28 14:46:08 1998 *** python.h.old Thu Jul 24 23:18:50 1997
--- python.h Fri Aug 28 15:46:08 1998
*************** ***************
*** 185,191 **** *** 184,191 ****
--- 185,203 ---- --- 184,203 ----
void cpp_declare_const(char *name, char *iname, DataType *type, char *value);
void cpp_class_decl(char *, char *,char *); void cpp_class_decl(char *, char *,char *);
void pragma(char *, char *, char *); void pragma(char *, char *, char *);
void add_typedef(DataType *t, char *name); void add_typedef(DataType *t, char *name);
@@ -50,11 +53,12 @@
+ {} + {}
+ }; + };
*** pycpp.cxx.old Fri Jan 02 20:23:22 1998 *** pycpp.cxx.old Fri Jan 02 21:23:22 1998
--- pycpp.cxx Fri Aug 28 16:01:46 1998 --- pycpp.cxx Tue Jul 20 14:34:36 1999
*************** ***************
*** 276,281 **** *** 275,282 ****
--- 276,282 ---- --- 275,283 ----
#endif
} }
} }
// if ((t->type != T_VOID) || (t->is_pointer)) // if ((t->type != T_VOID) || (t->is_pointer))
@@ -62,9 +66,11 @@
*pyclass << tab8 << "return val\n"; *pyclass << tab8 << "return val\n";
// Change the usage string to reflect our shadow class // Change the usage string to reflect our shadow class
*************** ***************
*** 394,399 **** *** 393,400 ****
--- 395,401 ---- --- 394,402 ----
}
} }
*construct << ")\n"; *construct << ")\n";
*construct << tab8 << "self.thisown = 1\n"; *construct << tab8 << "self.thisown = 1\n";
@@ -72,9 +78,14 @@
have_constructor = 1; have_constructor = 1;
} else { } else {
// Hmmm. We seem to be creating a different constructor. We're just going to create a
*************** ***************
*** 494,502 **** *** 490,503 ****
*pyclass << tab4 << "def __del__(self):\n" if (class_renamed) realname = class_name;
else realname = name;
}
! *pyclass << tab4 << "def __del__(self):\n"
<< tab8 << "if self.thisown == 1 :\n" << tab8 << "if self.thisown == 1 :\n"
<< tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n"; << tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n";
! !
@@ -83,8 +94,13 @@
if (doc_entry) { if (doc_entry) {
doc_entry->usage = ""; doc_entry->usage = "";
doc_entry->usage << "del this"; doc_entry->usage << "del this";
--- 496,503 ---- }
*pyclass << tab4 << "def __del__(self):\n" --- 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 << "if self.thisown == 1 :\n"
<< tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n"; << tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n";
! emitAddPragmas(*pyclass, "__del__", tab8); ! emitAddPragmas(*pyclass, "__del__", tab8);
@@ -92,9 +108,11 @@
if (doc_entry) { if (doc_entry) {
doc_entry->usage = ""; doc_entry->usage = "";
doc_entry->usage << "del this"; doc_entry->usage << "del this";
}
*************** ***************
*** 552,557 **** *** 551,558 ****
--- 553,560 ---- --- 552,561 ----
repr << tab4 << "def __repr__(self):\n"
<< tab8 << "return \"<C " << class_name <<" instance>\"\n"; << tab8 << "return \"<C " << class_name <<" instance>\"\n";
classes << repr; classes << repr;
@@ -103,9 +121,11 @@
} }
// Now build the real class with a normal constructor // Now build the real class with a normal constructor
*************** ***************
*** 747,752 **** *** 746,753 ****
--- 750,777 ---- --- 749,778 ----
hash.add(name,copy_string((char *) hash.lookup(t->name)));
} }
} }
@@ -134,3 +154,49 @@
/********************************************************************************* /*********************************************************************************
* *
* $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

@@ -1,5 +1,5 @@
*** cplus.cxx.old Mon Feb 02 14:55:42 1998 *** cplus.cxx.old Mon Feb 02 15:55:42 1998
--- cplus.cxx Fri Aug 28 12:02:50 1998 --- cplus.cxx Fri Aug 28 13:02:50 1998
*************** ***************
*** 581,612 **** *** 581,612 ****
// Class for managing class members (internally) // Class for managing class members (internally)
@@ -191,8 +191,8 @@
c = classlist; c = classlist;
while (c) { while (c) {
--- 732,739 ---- --- 732,739 ----
*** vector.cxx.old Fri Aug 28 14:23:16 1998 *** vector.cxx.old Fri Aug 28 15:23:16 1998
--- vector.cxx Fri Aug 28 14:46:52 1998 --- vector.cxx Fri Aug 28 15:46:52 1998
*************** ***************
*** 0 **** *** 0 ****
--- 1,182 ---- --- 1,182 ----
@@ -370,19 +370,50 @@
+ * + *
+ * -- Revision History + * -- Revision History
+ * $Log$ + * $Log$
+ * Revision 1.2 1999/04/30 03:28:35 RD + * Revision 1.3 1999/07/31 07:54:05 RD
+ * wxPython 2.0b9, first phase (win32) + * wxPython 2.1b1:
+ * Added gobs of stuff, see wxPython/README.txt for details
+ * + *
+ * Revision 1.1.4.1 1999/03/27 23:28:59 RD + * Added the missing wxWindow.GetUpdateRegion() method.
+ * + *
+ * wxPython 2.0b8 + * Made a new change in SWIG (update your patches everybody) that
+ * Python thread support + * provides a fix for global shadow objects that get an exception in
+ * various minor additions + * their __del__ when their extension module has already been deleted.
+ * various minor fixes + * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about
+ * line 496 if you want to do it by hand.
+ * + *
+ * Revision 1.1 1998/10/03 05:56:03 RD + * It is now possible to run through MainLoop more than once in any one
+ * *** empty log message *** + * 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.
+ * + *
+ * + *
+ ***********************************************************************/ + ***********************************************************************/
@@ -392,8 +423,8 @@
+ +
+ +
+ +
*** makefile.msc.old Mon Jun 23 15:15:32 1997 *** makefile.msc.old Mon Jun 23 16:15:32 1997
--- makefile.msc Fri Aug 28 10:21:58 1998 --- makefile.msc Fri Aug 28 11:21:58 1998
*************** ***************
*** 33,50 **** *** 33,50 ****
# Normally, you shouldn't have to change anything below this point # # Normally, you shouldn't have to change anything below this point #
@@ -433,8 +464,8 @@
# #
*** makefile.bc.old Sun Jan 04 12:49:24 1998 *** makefile.bc.old Sun Jan 04 13:49:24 1998
--- makefile.bc Fri Aug 28 14:42:58 1998 --- makefile.bc Fri Aug 28 15:42:58 1998
*************** ***************
*** 34,47 **** *** 34,47 ****
######################################################################## ########################################################################
@@ -466,8 +497,8 @@
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
LIBNAME = ..\libswig.lib LIBNAME = ..\libswig.lib
INCLUDE = -I../Include -I$(STD_INC) INCLUDE = -I../Include -I$(STD_INC)
*** Makefile.in.old Wed May 28 22:56:56 1997 *** Makefile.in.old Wed May 28 23:56:56 1997
--- Makefile.in Fri Aug 28 14:43:36 1998 --- Makefile.in Fri Aug 28 15:43:36 1998
*************** ***************
*** 51,63 **** *** 51,63 ****
# Normally, you shouldn't have to change anything below this point # # Normally, you shouldn't have to change anything below this point #

View File

@@ -1,15 +1,3 @@
#!/bin/env python
#----------------------------------------------------------------------------
# Name: ColorPanel.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 * from wxPython.wx import *

View File

@@ -1,4 +1,4 @@
#!/bin/env python #!/usr/bin/env python
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Name: DialogUnits.py # Name: DialogUnits.py
# Purpose: A minimal wxPython program that is a bit smarter than test1. # Purpose: A minimal wxPython program that is a bit smarter than test1.
@@ -46,6 +46,9 @@ class MyFrame(wxFrame):
wxDLG_SZE(panel, wxSize(36, -1)), wxDLG_SZE(panel, wxSize(36, -1)),
wxTE_READONLY) 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 # This method is called automatically when the CLOSE event is
# sent to this window # sent to this window

View File

@@ -43,7 +43,7 @@ _treeList = [
('wxPython Library', ['Sizers', 'Layoutf', 'wxScrolledMessageDialog', ('wxPython Library', ['Sizers', 'Layoutf', 'wxScrolledMessageDialog',
'wxMultipleChoiceDialog', 'wxPlotCanvas']), 'wxMultipleChoiceDialog', 'wxPlotCanvas']),
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot']), ('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
] ]
@@ -109,21 +109,20 @@ class wxPythonDemo(wxFrame):
self.nb = wxNotebook(splitter2, -1) self.nb = wxNotebook(splitter2, -1)
# Set up a TextCtrl on the Overview Notebook page # Set up a TextCtrl on the Overview Notebook page
self.ovr = wxTextCtrl(self.nb, -1, '', wxDefaultPosition, wxDefaultSize, self.ovr = wxTextCtrl(self.nb, -1, style = wxTE_MULTILINE|wxTE_READONLY)
wxTE_MULTILINE|wxTE_READONLY)
self.nb.AddPage(self.ovr, "Overview") self.nb.AddPage(self.ovr, "Overview")
# Set up a TextCtrl on the Demo Code Notebook page # Set up a TextCtrl on the Demo Code Notebook page
self.txt = wxTextCtrl(self.nb, -1, '', wxDefaultPosition, wxDefaultSize, self.txt = wxTextCtrl(self.nb, -1,
wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL) style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
self.txt.SetFont(wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false)) self.txt.SetFont(wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false))
self.nb.AddPage(self.txt, "Demo Code") self.nb.AddPage(self.txt, "Demo Code")
# Set up a log on the View Log Notebook page # Set up a log on the View Log Notebook page
self.log = wxTextCtrl(splitter2, -1, '', wxDefaultPosition, wxDefaultSize, self.log = wxTextCtrl(splitter2, -1,
wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL) style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
(w, self.charHeight) = self.log.GetTextExtent('X') (w, self.charHeight) = self.log.GetTextExtent('X')
#self.WriteText('wxPython Demo Log:\n') #self.WriteText('wxPython Demo Log:\n')
@@ -153,7 +152,8 @@ class wxPythonDemo(wxFrame):
w, h = self.log.GetClientSizeTuple() w, h = self.log.GetClientSizeTuple()
numLines = h/self.charHeight numLines = h/self.charHeight
x, y = self.log.PositionToXY(self.log.GetLastPosition()) x, y = self.log.PositionToXY(self.log.GetLastPosition())
self.log.ShowPosition(self.log.XYToPosition(x, y-numLines+1)) self.log.ShowPosition(self.log.XYToPosition(x, y-numLines))
##self.log.ShowPosition(self.log.GetLastPosition())
self.log.SetInsertionPointEnd() self.log.SetInsertionPointEnd()
def write(self, txt): def write(self, txt):
@@ -218,7 +218,7 @@ class wxPythonDemo(wxFrame):
# self.txt.WriteText("Cannot open %s file." % filename) # self.txt.WriteText("Cannot open %s file." % filename)
try: try:
self.txt.SetValue(open(filename).read()) self.txt.SetValue(open(filename).read())
except IOException: except IOError:
self.txt.WriteText("Cannot open %s file." % filename) self.txt.WriteText("Cannot open %s file." % filename)

View File

@@ -111,21 +111,17 @@ def makeSimpleBorder3(win):
def makeBoxInBox(win): def makeBoxInBox(win):
box = wxBoxSizer(wxVERTICAL) box = wxBoxSizer(wxVERTICAL)
btn = wxButton(win, 1010, "one") box.Add(wxButton(win, 1010, "one"))
box.Add(btn)
box2 = wxBoxSizer(wxHORIZONTAL) box2 = wxBoxSizer(wxHORIZONTAL)
btn = wxButton(win, 1010, "two") box2.AddMany([ wxButton(win, 1010, "two"),
box2.Add(btn) wxButton(win, 1010, "three"),
btn = wxButton(win, 1010, "three") wxButton(win, 1010, "four"),
box2.Add(btn) wxButton(win, 1010, "five"),
btn = wxButton(win, 1010, "four") ])
box2.Add(btn)
btn = wxButton(win, 1010, "five")
box2.Add(btn)
box3 = wxBoxSizer(wxVERTICAL) box3 = wxBoxSizer(wxVERTICAL)
box3.AddMany([ (wxButton(win, 1010, "six"), 1), box3.AddMany([ (wxButton(win, 1010, "six"), 0),
(wxButton(win, 1010, "seven"), 2), (wxButton(win, 1010, "seven"), 2),
(wxButton(win, 1010, "eight"), 1), (wxButton(win, 1010, "eight"), 1),
(wxButton(win, 1010, "nine"), 1), (wxButton(win, 1010, "nine"), 1),
@@ -134,8 +130,7 @@ def makeBoxInBox(win):
box2.Add(box3, 1) box2.Add(box3, 1)
box.Add(box2, 1) box.Add(box2, 1)
btn = wxButton(win, 1010, "ten") box.Add(wxButton(win, 1010, "ten"))
box.Add(btn)
return box return box
@@ -154,11 +149,11 @@ def makeBorderInBox(win):
insideBox = wxBoxSizer(wxHORIZONTAL) insideBox = wxBoxSizer(wxHORIZONTAL)
box2 = wxBoxSizer(wxHORIZONTAL) box2 = wxBoxSizer(wxHORIZONTAL)
box2.AddMany([ (wxButton(win, 1010, "one"), 0), box2.AddMany([ wxButton(win, 1010, "one"),
(wxButton(win, 1010, "two"), 0), wxButton(win, 1010, "two"),
(wxButton(win, 1010, "three"), 0), wxButton(win, 1010, "three"),
(wxButton(win, 1010, "four"), 0), wxButton(win, 1010, "four"),
(wxButton(win, 1010, "five"), 0), wxButton(win, 1010, "five"),
]) ])
insideBox.Add(box2, 0) insideBox.Add(box2, 0)
@@ -168,7 +163,7 @@ def makeBorderInBox(win):
insideBox.Add(bdr, 1) insideBox.Add(bdr, 1)
box3 = wxBoxSizer(wxVERTICAL) box3 = wxBoxSizer(wxVERTICAL)
box3.AddMany([ (wxButton(win, 1010, "six"), 1), box3.AddMany([ (wxButton(win, 1010, "six"), 0),
(wxButton(win, 1010, "seven"), 2), (wxButton(win, 1010, "seven"), 2),
(wxButton(win, 1010, "eight"), 1), (wxButton(win, 1010, "eight"), 1),
(wxButton(win, 1010, "nine"), 1), (wxButton(win, 1010, "nine"), 1),

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 = """\
"""

View File

@@ -1,4 +1,4 @@
#!/bin/env python #!/usr/bin/env python
import Main import Main
Main.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,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,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

@@ -15,9 +15,9 @@ class TestComboBox(wxPanel):
wxPoint(8, 10)) wxPoint(8, 10))
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18)) wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18))
wxComboBox(self, 50, "default value", wxPoint(80, 50), wxSize(95, 20), wxComboBox(self, 500, "default value", wxPoint(80, 50), wxSize(95, -1),
sampleList, wxCB_DROPDOWN) sampleList, wxCB_DROPDOWN)
EVT_COMBOBOX(self, 50, self.EvtComboBox) EVT_COMBOBOX(self, 500, self.EvtComboBox)
def EvtComboBox(self, event): def EvtComboBox(self, event):

View File

@@ -8,7 +8,7 @@ def runTest(frame, nb, log):
wxStaticText(win, -1, "This is a wxDialog", wxPoint(20, 20)) wxStaticText(win, -1, "This is a wxDialog", wxPoint(20, 20))
wxButton(win, wxID_OK, " OK ", wxPoint(75, 120), wxDefaultSize).SetDefault() wxButton(win, wxID_OK, " OK ", wxPoint(75, 120), wxDefaultSize).SetDefault()
wxButton(win, wxID_CANCEL, " Cancel ", wxPoint(150, 120), wxDefaultSize) wxButton(win, wxID_CANCEL, " Cancel ", wxPoint(200, 120), wxDefaultSize)
val = win.ShowModal() val = win.ShowModal()
if val == wxID_OK: if val == wxID_OK:

View File

@@ -19,8 +19,13 @@ else:
def runTest(frame, nb, log): def runTest(frame, nb, log):
win = TestGLCanvas(nb) #win = TestGLCanvas(nb)
return win #return win
win = wxFrame(frame, -1, "GL Cube", wxDefaultPosition, wxSize(400,300))
canvas = TestGLCanvas(win)
frame.otherWin = win
win.Show(true)
return None
@@ -140,7 +145,7 @@ overview = """\
def _test(): def _test():
class MyApp(wxApp): class MyApp(wxApp):
def OnInit(self): def OnInit(self):
frame = wxFrame(NULL, -1, "HELP ME!!") frame = wxFrame(NULL, -1, "GL Cube", wxDefaultPosition, wxSize(400,300))
win = TestGLCanvas(frame) win = TestGLCanvas(frame)
frame.Show(TRUE) frame.Show(TRUE)
self.SetTopWindow(frame) self.SetTopWindow(frame)

View File

@@ -25,6 +25,8 @@ class TestGrid(wxGrid):
EVT_GRID_CELL_LCLICK(self, self.OnCellClick) EVT_GRID_CELL_LCLICK(self, self.OnCellClick)
EVT_GRID_LABEL_LCLICK(self, self.OnLabelClick) EVT_GRID_LABEL_LCLICK(self, self.OnLabelClick)
self.SetEditInPlace(true)
#print self.GetCells()
def OnSelectCell(self, event): def OnSelectCell(self, event):

View File

@@ -48,6 +48,7 @@ class TestListCtrlPanel(wxPanel):
self.currentItem = 0 self.currentItem = 0
EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected) EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected)
EVT_LIST_DELETE_ITEM(self, tID, self.OnItemDelete)
EVT_LEFT_DCLICK(self.list, self.OnDoubleClick) EVT_LEFT_DCLICK(self.list, self.OnDoubleClick)
EVT_RIGHT_DOWN(self.list, self.OnRightDown) EVT_RIGHT_DOWN(self.list, self.OnRightDown)
@@ -68,6 +69,10 @@ class TestListCtrlPanel(wxPanel):
self.currentItem = event.m_itemIndex self.currentItem = event.m_itemIndex
self.log.WriteText("OnItemSelected: %s\n" % self.list.GetItemText(self.currentItem)) self.log.WriteText("OnItemSelected: %s\n" % self.list.GetItemText(self.currentItem))
def OnItemDelete(self, event):
self.log.WriteText("OnItemDelete\n")
def OnDoubleClick(self, event): def OnDoubleClick(self, event):
self.log.WriteText("OnDoubleClick item %s\n" % self.list.GetItemText(self.currentItem)) self.log.WriteText("OnDoubleClick item %s\n" % self.list.GetItemText(self.currentItem))
@@ -78,13 +83,16 @@ class TestListCtrlPanel(wxPanel):
tPopupID1 = 0 tPopupID1 = 0
tPopupID2 = 1 tPopupID2 = 1
tPopupID3 = 2 tPopupID3 = 2
tPopupID4 = 3
self.menu.Append(tPopupID1, "One") self.menu.Append(tPopupID1, "One")
self.menu.Append(tPopupID2, "Two") self.menu.Append(tPopupID2, "Two")
self.menu.Append(tPopupID3, "Three") self.menu.Append(tPopupID3, "Three")
self.menu.Append(tPopupID4, "DeleteAllItems")
EVT_MENU(self, tPopupID1, self.OnPopupOne) EVT_MENU(self, tPopupID1, self.OnPopupOne)
EVT_MENU(self, tPopupID2, self.OnPopupTwo) EVT_MENU(self, tPopupID2, self.OnPopupTwo)
EVT_MENU(self, tPopupID3, self.OnPopupThree) EVT_MENU(self, tPopupID3, self.OnPopupThree)
self.PopupMenu(self.menu, self.x, self.y) EVT_MENU(self, tPopupID4, self.OnPopupFour)
self.PopupMenu(self.menu, wxPoint(self.x, self.y))
def OnPopupOne(self, event): def OnPopupOne(self, event):
self.log.WriteText("Popup one\n") self.log.WriteText("Popup one\n")
@@ -95,6 +103,9 @@ class TestListCtrlPanel(wxPanel):
def OnPopupThree(self, event): def OnPopupThree(self, event):
self.log.WriteText("Popup three\n") self.log.WriteText("Popup three\n")
def OnPopupFour(self, event):
self.list.DeleteAllItems()
def OnSize(self, event): def OnSize(self, event):
w,h = self.GetClientSizeTuple() w,h = self.GetClientSizeTuple()
self.list.SetDimensions(0, 0, w, h) self.list.SetDimensions(0, 0, w, h)

View File

@@ -12,6 +12,11 @@ class TestRadioButtons(wxPanel):
'six', 'seven', 'eight'] 'six', 'seven', 'eight']
rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 30), wxDefaultSize, 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) sampleList, 3, wxRA_SPECIFY_COLS | wxNO_BORDER)
EVT_RADIOBOX(self, 30, self.EvtRadioBox) EVT_RADIOBOX(self, 30, self.EvtRadioBox)

View File

@@ -29,7 +29,7 @@ class TestTimerWin(wxPanel):
wxPoint(15, 30)) wxPoint(15, 30))
wxButton(self, 11101, ' Start ', wxPoint(15, 75), wxDefaultSize) wxButton(self, 11101, ' Start ', wxPoint(15, 75), wxDefaultSize)
wxButton(self, 11102, ' Stop ', wxPoint(77, 75), wxDefaultSize) wxButton(self, 11102, ' Stop ', wxPoint(115, 75), wxDefaultSize)
EVT_BUTTON(self, 11101, self.OnStart) EVT_BUTTON(self, 11101, self.OnStart)
EVT_BUTTON(self, 11102, self.OnStop) EVT_BUTTON(self, 11102, self.OnStop)

View File

@@ -1,6 +1,8 @@
from wxPython.wx import * from wxPython.wx import *
import string
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
class TestTreeCtrlPanel(wxPanel): class TestTreeCtrlPanel(wxPanel):
@@ -10,19 +12,23 @@ class TestTreeCtrlPanel(wxPanel):
self.log = log self.log = log
tID = NewId() tID = NewId()
self.tree = wxTreeCtrl(self, tID) self.tree = wxTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
root = self.tree.AddRoot("The Root Item") wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)
self.root = self.tree.AddRoot("The Root Item")
for x in range(15): for x in range(15):
child = self.tree.AppendItem(root, "Item %d" % x) child = self.tree.AppendItem(self.root, "Item %d" % x)
for y in range(5): for y in range(5):
last = self.tree.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y))) last = self.tree.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)))
for z in range(5): for z in range(5):
self.tree.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z)) self.tree.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z))
self.tree.Expand(root) self.tree.Expand(self.root)
EVT_TREE_ITEM_EXPANDED (self, tID, self.OnItemExpanded) EVT_TREE_ITEM_EXPANDED (self, tID, self.OnItemExpanded)
EVT_TREE_ITEM_COLLAPSED (self, tID, self.OnItemCollapsed) EVT_TREE_ITEM_COLLAPSED (self, tID, self.OnItemCollapsed)
EVT_TREE_SEL_CHANGED (self, tID, self.OnSelChanged) 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_LEFT_DCLICK(self.tree, self.OnLeftDClick)
EVT_RIGHT_DOWN(self.tree, self.OnRightClick) EVT_RIGHT_DOWN(self.tree, self.OnRightClick)
@@ -37,7 +43,30 @@ class TestTreeCtrlPanel(wxPanel):
def OnRightUp(self, event): def OnRightUp(self, event):
(x,y) = event.Position(); (x,y) = event.Position();
item = self.tree.HitTest(wxPoint(x,y)) item = self.tree.HitTest(wxPoint(x,y))
self.log.WriteText("OnRightUp: %s\n" % self.tree.GetItemText(item)) 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): def OnLeftDClick(self, event):
(x,y) = event.Position(); (x,y) = event.Position();
@@ -59,8 +88,8 @@ class TestTreeCtrlPanel(wxPanel):
self.log.WriteText("OnItemCollapsed: %s\n" % self.tree.GetItemText(item)) self.log.WriteText("OnItemCollapsed: %s\n" % self.tree.GetItemText(item))
def OnSelChanged(self, event): def OnSelChanged(self, event):
item = event.GetItem() self.item = event.GetItem()
self.log.WriteText("OnSelChanged: %s\n" % self.tree.GetItemText(item)) self.log.WriteText("OnSelChanged: %s\n" % self.tree.GetItemText(self.item))
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------

View File

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

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)
#----------------------------------------------------------------------------

View File

@@ -12,12 +12,18 @@ fi
strip /usr/lib/python1.5/site-packages/wxPython/wxcmodule.so 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 cat wxPython.spec.in | sed s/__VERSION__/$1/g > wxPython.spec
mkdir /usr/doc/wxPython-$1 mkdir /usr/doc/wxPython-$1
cp ../README.txt /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 rpm -bb wxPython.spec

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

View File

@@ -7,6 +7,9 @@ wxPython/demo/bitmaps/*.gif
wxPython/demo/bitmaps/*.png wxPython/demo/bitmaps/*.png
wxPython/demo/bitmaps/*.jpg wxPython/demo/bitmaps/*.jpg
wxPython/demo/README.txt wxPython/demo/README.txt
wxPython/demo/*.xml
wxPython/distrib/build.py
wxPython/lib/*.py wxPython/lib/*.py
wxPython/lib/*.txt wxPython/lib/*.txt
@@ -14,16 +17,15 @@ wxPython/lib/sizers/*.py
wxPython/lib/sizers/*.txt wxPython/lib/sizers/*.txt
wxPython/src/build.cfg
wxPython/src/*.i wxPython/src/*.i
wxPython/src/*.py wxPython/src/*.py
wxPython/src/*.cpp wxPython/src/*.cpp
wxPython/src/*.c
wxPython/src/*.h wxPython/src/*.h
wxPython/src/*.ico wxPython/src/*.ico
wxPython/src/*.def wxPython/src/*.def
wxPython/src/*.rc wxPython/src/*.rc
wxPython/src/makefile.*
wxPython/src/Makefile.pre.in
wxPython/src/Setup.*
wxPython/src/msw/*.cpp wxPython/src/msw/*.cpp
wxPython/src/msw/*.h wxPython/src/msw/*.h
@@ -37,8 +39,64 @@ wxpython/src/motif/*.cpp
wxPython/src/motif/*.h wxPython/src/motif/*.h
wxPython/src/motif/*.py wxPython/src/motif/*.py
wxPython/src/qt/*.cpp
wxPython/src/qt/*.h
wxPython/src/qt/*.py
wxPython/SWIG.patches/*.patch 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

@@ -35,7 +35,19 @@ extension language for applications that need a programmable interface.
#%install #%install
#make install #make install
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files %files
%doc /usr/doc/wxPython-__VERSION__/README.txt %doc /usr/doc/wxPython-__VERSION__
/usr/lib/libwxPyHelpers.so
/usr/lib/python1.5/site-packages/wxPython /usr/lib/python1.5/site-packages/wxPython

View File

@@ -17,7 +17,7 @@ item: Global
Patch Flags=0000000000001001 Patch Flags=0000000000001001
Patch Threshold=85 Patch Threshold=85
Patch Memory=4000 Patch Memory=4000
EXE Filename=wxPython-2.1b1.exe EXE Filename=wxPython-2.1b3.exe
FTP Cluster Size=20 FTP Cluster Size=20
Per-User Version ID=1 Per-User Version ID=1
Dialogs Version=6 Dialogs Version=6
@@ -314,9 +314,9 @@ item: Custom Dialog Set
Text= Text=
Text=Click Cancel to quit Setup and close any programs you have running. Click Next to continue with the Setup program . Text=Click Cancel to quit Setup and close any programs you have running. Click Next to continue with the Setup program .
Text= Text=
Text=WARNING: This program is protected by copyright law and international treaties. Text=WARNING: Although this program is OpenSource, it is still protected by copyright law and international treaties. See wxWindows Library Licence, Version 3 for details.
Text=
Text= Text=
Text=Unauthorized reproduction or distribution of this program, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under law.
Text French=Il vous est fortement recommand<6E> de fermer tous les programmes Windows avant d'ex<65>cuter le Programme d'Installation Text French=Il vous est fortement recommand<6E> de fermer tous les programmes Windows avant d'ex<65>cuter le Programme d'Installation
Text French= Text French=
Text French=Cliquez sur Annuler pour quitter l'Installation et fermez tous les programmes actuellement utilis<69>s. Cliquez sur Suivant pour continuer l'installation Text French=Cliquez sur Annuler pour quitter l'Installation et fermez tous les programmes actuellement utilis<69>s. Cliquez sur Suivant pour continuer l'installation
@@ -822,8 +822,8 @@ item: Install File
Flags=0000001010000011 Flags=0000001010000011
end end
item: Install File item: Install File
Source=e:\projects\wx\lib\wx200.dll Source=e:\projects\wx\lib\wx21b9.dll
Destination=%SYS%\wx200.dll Destination=%SYS%\wx21b9.dll
Flags=0000001010010010 Flags=0000001010010010
end end
item: Install File item: Install File
@@ -862,6 +862,18 @@ item: Install File
Description=Demos Description=Demos
Flags=0000000010000010 Flags=0000000010000010
end end
item: Install File
Source=E:\Projects\wx\utils\wxPython\demo\README.txt
Destination=%MAINDIR%\wxPython\demo
Description=Demos
Flags=0000000010000010
end
item: Install File
Source=e:\Projects\wx\utils\wxPython\demo\*.xml
Destination=%MAINDIR%\wxPython\demo
Description=Demos
Flags=0000000010000010
end
item: Install File item: Install File
Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.bmp Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.bmp
Destination=%MAINDIR%\wxPython\demo\bitmaps Destination=%MAINDIR%\wxPython\demo\bitmaps
@@ -900,6 +912,36 @@ item: Install File
Description=wxPython documentation Description=wxPython documentation
Flags=0000000010000010 Flags=0000000010000010
end end
item: Install File
Source=E:\PROJECTS\wx\docs\preamble.txt
Destination=%MAINDIR%\wxPython\docs\preamble.txt
Description=wxPython documentation
Flags=0000000010000010
end
item: Install File
Source=E:\PROJECTS\wx\docs\licence.txt
Destination=%MAINDIR%\wxPython\docs\licence.txt
Description=wxPython documentation
Flags=0000000010000010
end
item: Install File
Source=E:\PROJECTS\wx\docs\licendoc.txt
Destination=%MAINDIR%\wxPython\docs\licendoc.txt
Description=wxPython documentation
Flags=0000000010000010
end
item: Install File
Source=E:\PROJECTS\wx\docs\lgpl.txt
Destination=%MAINDIR%\wxPython\docs\lgpl.txt
Description=wxPython documentation
Flags=0000000010000010
end
item: Install File
Source=E:\PROJECTS\wx\docs\gpl.txt
Destination=%MAINDIR%\wxPython\docs\gpl.txt
Description=wxPython documentation
Flags=0000000010000010
end
item: Remark item: Remark
end end
remarked item: If/While Statement remarked item: If/While Statement

Binary file not shown.

View File

@@ -19,7 +19,7 @@ class wxScrolledMessageDialog(wxDialog):
text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,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,))) ok.SetConstraints(Layoutf('b=b5#1;x%w50#1;w!80;h!25', (self,)))
self.SetAutoLayout(TRUE) self.SetAutoLayout(TRUE)
self.Layout()
class wxMultipleChoiceDialog(wxDialog): class wxMultipleChoiceDialog(wxDialog):
@@ -47,6 +47,7 @@ class wxMultipleChoiceDialog(wxDialog):
cancel.SetConstraints(Layoutf('b=b5#1;x%w75#1;w!80;h!25', (self,))) cancel.SetConstraints(Layoutf('b=b5#1;x%w75#1;w!80;h!25', (self,)))
self.SetAutoLayout(TRUE) self.SetAutoLayout(TRUE)
self.lst = lst self.lst = lst
self.Layout()
def OnSize(self, event): def OnSize(self, event):
self.Layout() self.Layout()

View File

@@ -55,6 +55,8 @@ class wxSizer:
the Add method. the Add method.
""" """
for childinfo in widgets: for childinfo in widgets:
if type(childinfo) != type(()):
childinfo = (childinfo, )
apply(self.Add, childinfo) apply(self.Add, childinfo)

View File

@@ -0,0 +1,14 @@
Modules subdir, more info later...
stubs contains a template for new modules.
html, lseditor are more or less usuable.
glcanvas is moved from the main src directory.
Note, there are no SWIG generated files in CVS yet. I don't expect them to
be useful at this stage, since you can't hack this stuff without a working &
patched up SWIG anyway. Besides, those big files really bog down my phone
line.
Harm van der Heijden, Aug 11, 1999.

View File

@@ -0,0 +1,27 @@
#!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: buildall.py
# Purpose: Invokes the build script for all modules defined in
# MODULELIST
#
# Author: Robin Dunn
#
# Created: 18-Aug-1999
# RCS-ID: $Id$
# Copyright: (c) 1999 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
import sys, os
sys.path.insert(0, '../distrib')
import build
MODULELIST = ['html', 'glcanvas', 'utils', 'lseditor']
for module in MODULELIST:
cwd = os.getcwd()
print "**** Building %s" % module
build.main([sys.argv[0], '-C', module] + sys.argv[1:])
os.chdir(cwd)

View File

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

View File

@@ -0,0 +1,24 @@
# -*- python -*-
import sys
MODULE = 'glcanvasc'
SWIGFILES = ['glcanvas.i', ]
# Special action; for win32 we require you make the glcanvas lib. The
# makefile will copy it to WXWIN\lib
# Unix make system isn't so advanced, so we'll go looking for the source
# file ourselves...
if sys.platform == 'win32':
OTHERLIBS = '$(WXDIR)\lib\glcanvas.lib glu32.lib opengl32.lib'
OTHERCFLAGS = '-DWITH_GLCANVAS -I$(WXDIR)\utils\glcanvas\win'
else:
SOURCES = [GENCODEDIR+'/_glcanvas.cpp']
print "Warning: Assuming MesaGL libraries. Override OTHERLIBS in build.local\n"\
" if you have native GL!"
OTHERCFLAGS = '-DWITH_GLCANVAS -I$(WXDIR)\utils\glcanvas\gtk'
OTHERLIBS = "-lMesaGL -lMesaGLU"
OTHERRULES = """
$(GENCODEDIR)/_glcanvas.cpp :
cp $(WXDIR)/utils/glcanvas/$(GENCODEDIR)/glcanvas.cpp $@
"""

View File

@@ -36,7 +36,7 @@
%{ %{
#ifdef SEPARATE #if defined(__WXMSW__)
static wxString wxPyEmptyStr(""); static wxString wxPyEmptyStr("");
static wxPoint wxPyDefaultPosition(-1, -1); static wxPoint wxPyDefaultPosition(-1, -1);
static wxSize wxPyDefaultSize(-1, -1); static wxSize wxPyDefaultSize(-1, -1);
@@ -64,11 +64,13 @@ public:
void SetColour(const char *colour); void SetColour(const char *colour);
void SwapBuffers(); void SwapBuffers();
// void SetupPixelFormat(); #ifdef __WXGTK__
// void SetupPalette(const wxPalette& palette); void SetupPixelFormat();
// wxPalette CreateDefaultPalette(); void SetupPalette(const wxPalette& palette);
wxPalette CreateDefaultPalette();
wxPalette* GetPalette();
#endif
// wxPalette* GetPalette();
wxWindow* GetWindow(); wxWindow* GetWindow();
}; };
@@ -822,7 +824,7 @@ void glDrawBuffer (GLenum mode);
void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
void glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); void glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
void glEdgeFlag (GLboolean flag); void glEdgeFlag (GLboolean flag);
void glEdgeFlagPointer (GLsizei stride, const GLvoid *pointer); void glEdgeFlagPointer (GLsizei stride, const GLboolean *pointer);
void glEdgeFlagv (const GLboolean *flag); void glEdgeFlagv (const GLboolean *flag);
void glEnable (GLenum cap); void glEnable (GLenum cap);
void glEnableClientState (GLenum array); void glEnableClientState (GLenum array);
@@ -1091,6 +1093,7 @@ void glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
%init %{ %init %{
wxClassInfo::CleanUpClasses(); wxClassInfo::CleanUpClasses();

View File

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

View File

@@ -35,31 +35,41 @@ class wxGLContextPtr :
def __init__(self,this): def __init__(self,this):
self.this = this self.this = this
self.thisown = 0 self.thisown = 0
def __del__(self): def __del__(self,glcanvasc=glcanvasc):
if self.thisown == 1 : if self.thisown == 1 :
glcanvasc.delete_wxGLContext(self.this) glcanvasc.delete_wxGLContext(self)
def SetCurrent(self): def SetCurrent(self, *_args, **_kwargs):
val = glcanvasc.wxGLContext_SetCurrent(self.this) val = apply(glcanvasc.wxGLContext_SetCurrent,(self,) + _args, _kwargs)
return val return val
def SetColour(self,arg0): def SetColour(self, *_args, **_kwargs):
val = glcanvasc.wxGLContext_SetColour(self.this,arg0) val = apply(glcanvasc.wxGLContext_SetColour,(self,) + _args, _kwargs)
return val return val
def SwapBuffers(self): def SwapBuffers(self, *_args, **_kwargs):
val = glcanvasc.wxGLContext_SwapBuffers(self.this) val = apply(glcanvasc.wxGLContext_SwapBuffers,(self,) + _args, _kwargs)
return val return val
def GetWindow(self): def SetupPixelFormat(self, *_args, **_kwargs):
val = glcanvasc.wxGLContext_GetWindow(self.this) val = apply(glcanvasc.wxGLContext_SetupPixelFormat,(self,) + _args, _kwargs)
val = wxWindowPtr(val) return val
def SetupPalette(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_SetupPalette,(self,) + _args, _kwargs)
return val
def CreateDefaultPalette(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_CreateDefaultPalette,(self,) + _args, _kwargs)
if val: val = wxPalettePtr(val) ; val.thisown = 1
return val
def GetPalette(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_GetPalette,(self,) + _args, _kwargs)
if val: val = wxPalettePtr(val)
return val
def GetWindow(self, *_args, **_kwargs):
val = apply(glcanvasc.wxGLContext_GetWindow,(self,) + _args, _kwargs)
if val: val = wxWindowPtr(val)
return val return val
def __repr__(self): def __repr__(self):
return "<C wxGLContext instance>" return "<C wxGLContext instance at %s>" % (self.this,)
class wxGLContext(wxGLContextPtr): class wxGLContext(wxGLContextPtr):
def __init__(self,arg0,arg1,*args) : def __init__(self,*_args,**_kwargs):
argl = map(None,args) self.this = apply(glcanvasc.new_wxGLContext,_args,_kwargs)
try: argl[0] = argl[0].this
except: pass
args = tuple(argl)
self.this = apply(glcanvasc.new_wxGLContext,(arg0,arg1.this,)+args)
self.thisown = 1 self.thisown = 1
@@ -69,32 +79,24 @@ class wxGLCanvasPtr(wxScrolledWindowPtr):
def __init__(self,this): def __init__(self,this):
self.this = this self.this = this
self.thisown = 0 self.thisown = 0
def SetCurrent(self): def SetCurrent(self, *_args, **_kwargs):
val = glcanvasc.wxGLCanvas_SetCurrent(self.this) val = apply(glcanvasc.wxGLCanvas_SetCurrent,(self,) + _args, _kwargs)
return val return val
def SetColour(self,arg0): def SetColour(self, *_args, **_kwargs):
val = glcanvasc.wxGLCanvas_SetColour(self.this,arg0) val = apply(glcanvasc.wxGLCanvas_SetColour,(self,) + _args, _kwargs)
return val return val
def SwapBuffers(self): def SwapBuffers(self, *_args, **_kwargs):
val = glcanvasc.wxGLCanvas_SwapBuffers(self.this) val = apply(glcanvasc.wxGLCanvas_SwapBuffers,(self,) + _args, _kwargs)
return val return val
def GetContext(self): def GetContext(self, *_args, **_kwargs):
val = glcanvasc.wxGLCanvas_GetContext(self.this) val = apply(glcanvasc.wxGLCanvas_GetContext,(self,) + _args, _kwargs)
val = wxGLContextPtr(val) if val: val = wxGLContextPtr(val)
return val return val
def __repr__(self): def __repr__(self):
return "<C wxGLCanvas instance>" return "<C wxGLCanvas instance at %s>" % (self.this,)
class wxGLCanvas(wxGLCanvasPtr): class wxGLCanvas(wxGLCanvasPtr):
def __init__(self,arg0,*args) : def __init__(self,*_args,**_kwargs):
argl = map(None,args) self.this = apply(glcanvasc.new_wxGLCanvas,_args,_kwargs)
try: argl[1] = argl[1].this
except: pass
try: argl[2] = argl[2].this
except: pass
try: argl[6] = argl[6].this
except: pass
args = tuple(argl)
self.this = apply(glcanvasc.new_wxGLCanvas,(arg0.this,)+args)
self.thisown = 1 self.thisown = 1
wx._StdWindowCallbacks(self) wx._StdWindowCallbacks(self)

View File

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

View File

@@ -35,31 +35,27 @@ class wxGLContextPtr :
def __init__(self,this): def __init__(self,this):
self.this = this self.this = this
self.thisown = 0 self.thisown = 0
def __del__(self): def __del__(self,glcanvasc=glcanvasc):
if self.thisown == 1 : if self.thisown == 1 :
glcanvasc.delete_wxGLContext(self.this) glcanvasc.delete_wxGLContext(self)
def SetCurrent(self): def SetCurrent(self, *_args, **_kwargs):
val = glcanvasc.wxGLContext_SetCurrent(self.this) val = apply(glcanvasc.wxGLContext_SetCurrent,(self,) + _args, _kwargs)
return val return val
def SetColour(self,arg0): def SetColour(self, *_args, **_kwargs):
val = glcanvasc.wxGLContext_SetColour(self.this,arg0) val = apply(glcanvasc.wxGLContext_SetColour,(self,) + _args, _kwargs)
return val return val
def SwapBuffers(self): def SwapBuffers(self, *_args, **_kwargs):
val = glcanvasc.wxGLContext_SwapBuffers(self.this) val = apply(glcanvasc.wxGLContext_SwapBuffers,(self,) + _args, _kwargs)
return val return val
def GetWindow(self): def GetWindow(self, *_args, **_kwargs):
val = glcanvasc.wxGLContext_GetWindow(self.this) val = apply(glcanvasc.wxGLContext_GetWindow,(self,) + _args, _kwargs)
val = wxWindowPtr(val) if val: val = wxWindowPtr(val)
return val return val
def __repr__(self): def __repr__(self):
return "<C wxGLContext instance>" return "<C wxGLContext instance at %s>" % (self.this,)
class wxGLContext(wxGLContextPtr): class wxGLContext(wxGLContextPtr):
def __init__(self,arg0,arg1,*args) : def __init__(self,*_args,**_kwargs):
argl = map(None,args) self.this = apply(glcanvasc.new_wxGLContext,_args,_kwargs)
try: argl[0] = argl[0].this
except: pass
args = tuple(argl)
self.this = apply(glcanvasc.new_wxGLContext,(arg0,arg1.this,)+args)
self.thisown = 1 self.thisown = 1
@@ -69,32 +65,24 @@ class wxGLCanvasPtr(wxScrolledWindowPtr):
def __init__(self,this): def __init__(self,this):
self.this = this self.this = this
self.thisown = 0 self.thisown = 0
def SetCurrent(self): def SetCurrent(self, *_args, **_kwargs):
val = glcanvasc.wxGLCanvas_SetCurrent(self.this) val = apply(glcanvasc.wxGLCanvas_SetCurrent,(self,) + _args, _kwargs)
return val return val
def SetColour(self,arg0): def SetColour(self, *_args, **_kwargs):
val = glcanvasc.wxGLCanvas_SetColour(self.this,arg0) val = apply(glcanvasc.wxGLCanvas_SetColour,(self,) + _args, _kwargs)
return val return val
def SwapBuffers(self): def SwapBuffers(self, *_args, **_kwargs):
val = glcanvasc.wxGLCanvas_SwapBuffers(self.this) val = apply(glcanvasc.wxGLCanvas_SwapBuffers,(self,) + _args, _kwargs)
return val return val
def GetContext(self): def GetContext(self, *_args, **_kwargs):
val = glcanvasc.wxGLCanvas_GetContext(self.this) val = apply(glcanvasc.wxGLCanvas_GetContext,(self,) + _args, _kwargs)
val = wxGLContextPtr(val) if val: val = wxGLContextPtr(val)
return val return val
def __repr__(self): def __repr__(self):
return "<C wxGLCanvas instance>" return "<C wxGLCanvas instance at %s>" % (self.this,)
class wxGLCanvas(wxGLCanvasPtr): class wxGLCanvas(wxGLCanvasPtr):
def __init__(self,arg0,*args) : def __init__(self,*_args,**_kwargs):
argl = map(None,args) self.this = apply(glcanvasc.new_wxGLCanvas,_args,_kwargs)
try: argl[1] = argl[1].this
except: pass
try: argl[2] = argl[2].this
except: pass
try: argl[6] = argl[6].this
except: pass
args = tuple(argl)
self.this = apply(glcanvasc.new_wxGLCanvas,(arg0.this,)+args)
self.thisown = 1 self.thisown = 1
wx._StdWindowCallbacks(self) wx._StdWindowCallbacks(self)

View File

@@ -0,0 +1,13 @@
*.exp
*.lib
*.obj
*.pch
Makefile
Makefile.pre
Setup
build.local
config.c
htmlc.ilk
htmlc.pyd
sedscript

View File

@@ -0,0 +1,23 @@
Known bugs
html, all:
- keys can move the vertical scrollbar, but the window moveth not.
problem in wxHTML.
- widgets are not removed when the HTML contents is changed
(this can be fixed by adding ~HtmlWidgetCell { wnd->Destroy(); } )
- potential problem with the use of ThreadState in html.i
(mainly because I don't really know what I'm doing there)
html, msw:
- vertical scrollbar behaves erratically when content smaller than
window
- page with widgets takes forever to draw when constructed
in frame constructor
- sometimes the python scripts with html crash on startup, before
the window is displayed (illegal operation). this seems mainly to
happen when the various libs are not yet in the disk cache. race
condition?

View File

@@ -0,0 +1,11 @@
Aug. 2 1999 Harm van der Heijden
What's in here:
html
-- minimal wrap of Vaclaf Slavik's wxHTML (now part of
wxWindows); only parts of the wxHtmlWindow class are used.
Testsample htmlview.py.
There's also a python tag handler, see htmlwidget.py for
a demonstration.

View File

@@ -0,0 +1,6 @@
# -*- python -*-
MODULE = 'htmlc'
SWIGFILES = ['html.i', ]
PYFILES = ['htmlhelper.py']

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,121 @@
# This file was created automatically by SWIG.
import htmlc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from events import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
import wx,htmlhelper
widget = htmlc
class HtmlHistoryItemPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def GetPos(self, *_args, **_kwargs):
val = apply(htmlc.HtmlHistoryItem_GetPos,(self,) + _args, _kwargs)
return val
def SetPos(self, *_args, **_kwargs):
val = apply(htmlc.HtmlHistoryItem_SetPos,(self,) + _args, _kwargs)
return val
def GetPage(self, *_args, **_kwargs):
val = apply(htmlc.HtmlHistoryItem_GetPage,(self,) + _args, _kwargs)
return val
def GetAnchor(self, *_args, **_kwargs):
val = apply(htmlc.HtmlHistoryItem_GetAnchor,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C HtmlHistoryItem instance at %s>" % (self.this,)
class HtmlHistoryItem(HtmlHistoryItemPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(htmlc.new_HtmlHistoryItem,_args,_kwargs)
self.thisown = 1
class wxHtmlWindowPtr(wxScrolledWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def SetPage(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetPage,(self,) + _args, _kwargs)
return val
def LoadPage(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_LoadPage,(self,) + _args, _kwargs)
return val
def GetOpenedPage(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_GetOpenedPage,(self,) + _args, _kwargs)
return val
def SetRelatedFrame(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetRelatedFrame,(self,) + _args, _kwargs)
return val
def GetRelatedFrame(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_GetRelatedFrame,(self,) + _args, _kwargs)
if val: val = wxFramePtr(val)
return val
def SetRelatedStatusBar(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetRelatedStatusBar,(self,) + _args, _kwargs)
return val
def SetFonts(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetFonts,(self,) + _args, _kwargs)
return val
def SetTitle(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetTitle,(self,) + _args, _kwargs)
return val
def SetBorders(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetBorders,(self,) + _args, _kwargs)
return val
def HistoryBack(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_HistoryBack,(self,) + _args, _kwargs)
return val
def HistoryForward(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_HistoryForward,(self,) + _args, _kwargs)
return val
def HistoryClear(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_HistoryClear,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxHtmlWindow instance at %s>" % (self.this,)
class wxHtmlWindow(wxHtmlWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(htmlc.new_wxHtmlWindow,_args,_kwargs)
self.thisown = 1
wx._StdWindowCallbacks(self)
wx._StdOnScrollCallbacks(self)
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------

View File

@@ -0,0 +1,259 @@
/////////////////////////////////////////////////////////////////////////////
// Name: html.i
// Purpose: SWIG definitions of html classes
//
// Author: Robin Dunn
//
// Created: 25-nov-1998
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module html
%{
#include "helpers.h"
#include <wx/html/htmlwin.h>
#include <wx/image.h>
#include <wx/fs_zip.h>
#include <wx/fs_inet.h>
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%extern windows.i
%extern _defs.i
%extern events.i
//%extern windows2.i
//%extern windows3.i
//%extern frames.i
//%extern misc.i
//%extern gdi.i
//%extern controls.i
%{
#ifdef __WXMSW__
static wxString wxPyEmptyStr("");
static wxPoint wxPyDefaultPosition(wxDefaultPosition);
static wxSize wxPyDefaultSize(wxDefaultSize);
#endif
static PyThreadState* wxPyThreadState;
%}
%pragma(python) code = "import wx,htmlhelper"
%pragma(python) code = "widget = htmlc"
%{
static PyObject* mod_dict = NULL; // will be set by init
#include <wx/html/mod_templ.h>
TAG_HANDLER_BEGIN(PYTHONTAG, "PYTHON")
TAG_HANDLER_PROC(tag)
{
wxWindow *wnd;
wxString errmsg;
char pbuf[256];
int fl = 0;
while (1) {
#ifdef WXP_WITH_THREAD
PyEval_RestoreThread(wxPyThreadState);
#endif
if (tag.HasParam("FLOAT"))
tag.ScanParam("FLOAT", "%i", &fl);
PyObject* pyfunc = PyDict_GetItemString(mod_dict, "WidgetStarter");
if (pyfunc == NULL) {
errmsg = "Could not find object WidgetStarter";
break;
}
if (! PyCallable_Check(pyfunc)) {
errmsg = "WidgetStarter does not appear to be callable";
break;
}
SWIG_MakePtr(pbuf, m_WParser->GetWindow(), "_wxHtmlWindow_p");
PyObject* arglist = Py_BuildValue("(s,s)", pbuf,
(const char*)tag.GetAllParams());
if (! arglist) {
errmsg = "Failed making argument list";
break;
}
PyObject* ret = PyEval_CallObject(pyfunc, arglist);
Py_DECREF(arglist);
if (ret == NULL) {
errmsg = "An error occured while calling WidgetStarter";
if (PyErr_Occurred())
PyErr_Print();
break;
}
wnd = NULL;
if (PyString_Check(ret)) {
char* thisc = PyString_AsString(ret);
SWIG_GetPtr(thisc, (void**)&wnd, "_wxWindow_p");
}
Py_DECREF(ret);
if (! wnd) {
errmsg = "Could not make a wxWindow pointer from return ptr";
break;
}
#ifdef WXP_WITH_THREAD
PyEval_SaveThread();
#endif
wnd -> Show(TRUE);
m_WParser->OpenContainer()->InsertCell(new wxHtmlWidgetCell(wnd, fl));
return FALSE;
}
/* we got out of the loop. Must be an error. Show a box stating it. */
#ifdef WXP_WITH_THREAD
PyEval_SaveThread();
#endif
wnd = new wxTextCtrl( m_WParser -> GetWindow(), -1,
errmsg, wxPoint(0,0),
wxSize(300, 100), wxTE_MULTILINE );
wnd -> Show(TRUE);
m_WParser->OpenContainer()->InsertCell(new wxHtmlWidgetCell(wnd, 100));
return FALSE;
}
TAG_HANDLER_END(PYTHONTAG)
TAGS_MODULE_BEGIN(PythonTag)
TAGS_MODULE_ADD(PYTHONTAG)
TAGS_MODULE_END(PythonTag)
// Note: see also the init function where we add the module!
%}
//---------------------------------------------------------------------------
// item of history list
class HtmlHistoryItem
{
public:
HtmlHistoryItem(const char* p, const char* a);
int GetPos() const {return m_Pos;}
void SetPos(int p) {m_Pos = p;}
const wxString& GetPage() const ;
const wxString& GetAnchor() const ;
};
class wxHtmlWindow : public wxScrolledWindow
{
public:
wxHtmlWindow(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxPyDefaultPosition,
const wxSize& size = wxPyDefaultSize,
int flags=wxHW_SCROLLBAR_AUTO,
const char* name = "htmlWindow");
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
%pragma(python) addtomethod = "__init__:wx._StdOnScrollCallbacks(self)"
bool SetPage(const char* source);
// Set HTML page and display it. !! source is HTML document itself,
// it is NOT address/filename of HTML document. If you want to
// specify document location, use LoadPage() istead
// Return value : FALSE if an error occured, TRUE otherwise
bool LoadPage(const char* location);
// Load HTML page from given location. Location can be either
// a) /usr/wxGTK2/docs/html/wx.htm
// b) http://www.somewhere.uk/document.htm
// c) ftp://ftp.somesite.cz/pub/something.htm
// In case there is no prefix (http:,ftp:), the method
// will try to find it itself (1. local file, then http or ftp)
// After the page is loaded, the method calls SetPage() to display it.
// Note : you can also use path relative to previously loaded page
// Return value : same as SetPage
wxString GetOpenedPage() const {return m_OpenedPage;}
// Returns full location of opened page
void SetRelatedFrame(wxFrame* frame, const char* format);
// sets frame in which page title will be displayed. Format is format of
// frame title, e.g. "HtmlHelp : %s". It must contain exactly one %s
wxFrame* GetRelatedFrame() const;
void SetRelatedStatusBar(int bar);
// after(!) calling SetRelatedFrame, this sets statusbar slot where messages
// will be displayed. Default is -1 = no messages.
void SetFonts(wxString normal_face, int normal_italic_mode, wxString fixed_face, int fixed_italic_mode, int *sizes);
// sets fonts to be used when displaying HTML page.
// *_italic_mode can be either wxSLANT or wxITALIC
void SetTitle(const char* title);
// Sets the title of the window
// (depending on the information passed to SetRelatedFrame() method)
void SetBorders(int b);
// Sets space between text and window borders.
//virtual void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
// saves custom settings into cfg config. it will use the path 'path'
// if given, otherwise it will save info into currently selected path.
// saved values : things set by SetFonts, SetBorders.
//virtual void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
// ...
bool HistoryBack();
bool HistoryForward();
// Goes to previous/next page (in browsing history)
// Returns TRUE if successful, FALSE otherwise
void HistoryClear();
// Resets history
//wxHtmlContainerCell* GetInternalRepresentation() const;
// Returns pointer to conteiners/cells structure.
// It should be used ONLY when printing
//static void AddFilter(wxHtmlFilter *filter);
// Adds input filter
/* This function needs to be eventified! */
//virtual void OnLinkClicked(const char* link);
// called when users clicked on hypertext link. Default behavior is to
// call LoadPage(loc)
//static void CleanUpStatics();
// cleans static variables
};
//---------------------------------------------------------------------------
%init %{
/* This is a bit cheesy. SWIG happens to call the dictionary d...
* I save it here, 'cause I don't know how to get it back later! */
mod_dict = d;
wxPyThreadState = PyThreadState_Get();
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
/* specifically add our python tag handler; it doesn't seem to
* happen by itself... */
wxHtmlWinParser::AddModule(new HTML_ModulePythonTag());
// Until wxFileSystem is wrapped...
#if wxUSE_FS_ZIP
wxFileSystem::AddHandler(new wxZipFSHandler);
#endif
%}
//---------------------------------------------------------------------------

View File

@@ -0,0 +1,2 @@
EXPORTS
inithtmlc

View File

@@ -0,0 +1,59 @@
#
# htmlhelper.py
#
# A few helper functions for putting wxPython widgets in html pages
#
# Harm van der Heijden, 11 aug 1999.
import wx
import string
import htmlc
# Function to parse a param string (of the form 'item=value item2="value etc"'
# and creates a dictionary
def _param2dict(param):
i = 0; j = 0; s = len(param); d = {}
d['param_str'] = param
while 1:
while i<s and param[i] == " " : i = i+1
if i>=s: break
j = i
while j<s and param[j] != "=": j=j+1
if j+1>=s:
break
word = param[i:j]
i=j+1
if (param[i] == '"'):
j=i+1
while j<s and param[j] != '"' : j=j+1
if j == s: break
val = param[i+1:j]
elif (param[i] != " "):
j=i+1
while j<s and param[j] != " " : j=j+1
val = param[i:j]
else:
val = ""
i=j+1
d[string.lower(word)] = val
return d
# This function gets called by the <python> tag handler.
# Arguments are the parent (wxHtmlWindow) SWIG pointer (in python, a string)
# and a string containing the parameters.
# The return value must be the SWIG pointer of the created widget (the 'this'
# attribute in python). The widget must be derived from a wxWindow or one
# of its descendants.
def _WidgetStarter(parentptr, param):
# create a python instance of the parent
parent = wx.wxWindowPtr(parentptr)
# try to find the widget class in the htmlwinc (=htmlwidget) module
dict = _param2dict(param)
classname = dict['class']
obj = htmlc.__dict__[classname]
# now create the class with arguments parent, dictionary
cls = apply(obj, (parent, dict))
# return the class instance's pointer
return cls.this
htmlc.WidgetStarter = _WidgetStarter

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,121 @@
# This file was created automatically by SWIG.
import htmlc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from events import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
import wx,htmlhelper
widget = htmlc
class HtmlHistoryItemPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def GetPos(self, *_args, **_kwargs):
val = apply(htmlc.HtmlHistoryItem_GetPos,(self,) + _args, _kwargs)
return val
def SetPos(self, *_args, **_kwargs):
val = apply(htmlc.HtmlHistoryItem_SetPos,(self,) + _args, _kwargs)
return val
def GetPage(self, *_args, **_kwargs):
val = apply(htmlc.HtmlHistoryItem_GetPage,(self,) + _args, _kwargs)
return val
def GetAnchor(self, *_args, **_kwargs):
val = apply(htmlc.HtmlHistoryItem_GetAnchor,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C HtmlHistoryItem instance at %s>" % (self.this,)
class HtmlHistoryItem(HtmlHistoryItemPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(htmlc.new_HtmlHistoryItem,_args,_kwargs)
self.thisown = 1
class wxHtmlWindowPtr(wxScrolledWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def SetPage(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetPage,(self,) + _args, _kwargs)
return val
def LoadPage(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_LoadPage,(self,) + _args, _kwargs)
return val
def GetOpenedPage(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_GetOpenedPage,(self,) + _args, _kwargs)
return val
def SetRelatedFrame(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetRelatedFrame,(self,) + _args, _kwargs)
return val
def GetRelatedFrame(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_GetRelatedFrame,(self,) + _args, _kwargs)
if val: val = wxFramePtr(val)
return val
def SetRelatedStatusBar(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetRelatedStatusBar,(self,) + _args, _kwargs)
return val
def SetFonts(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetFonts,(self,) + _args, _kwargs)
return val
def SetTitle(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetTitle,(self,) + _args, _kwargs)
return val
def SetBorders(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_SetBorders,(self,) + _args, _kwargs)
return val
def HistoryBack(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_HistoryBack,(self,) + _args, _kwargs)
return val
def HistoryForward(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_HistoryForward,(self,) + _args, _kwargs)
return val
def HistoryClear(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlWindow_HistoryClear,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxHtmlWindow instance at %s>" % (self.this,)
class wxHtmlWindow(wxHtmlWindowPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(htmlc.new_wxHtmlWindow,_args,_kwargs)
self.thisown = 1
wx._StdWindowCallbacks(self)
wx._StdOnScrollCallbacks(self)
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------

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,13 @@
*.exp
*.lib
*.obj
*.pch
Makefile
Makefile.pre
Setup
build.local
config.c
lseditorc.ilk
lseditorc.pyd
sedscript

View File

@@ -0,0 +1,6 @@
Known bugs/features
editor, all:
- (missing feature, really) syntax highlighting data is
compile time.

View File

@@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@@ -0,0 +1,13 @@
Aug. 2 1999 Harm van der Heijden
What's in here:
lseditorplugin
-- minimal wrap of Alexanders Gluchovas' editor plugin. The code was
ransacked from the wxStudio (http://wxstudio.linuxbox.com) project.
Since the editor is released under the Gnu Public License, this
module, as a derivative work, is also released under this licence
and NOT THE WXWINDOWS LICENSE. See the file COPYING for details.
the file 'editor.py' contains a sample implementation using the
editorplugin object.

View File

@@ -0,0 +1,9 @@
# -*- python -*-
MODULE = 'lseditorc'
SWIGFILES = ['lseditor.i']
SOURCES = ['finddlg.cpp', 'lseditorpl.cpp', 'markup.cpp', 'plugin.cpp',
'sourcepainter.cpp', 'tdefs.cpp']

View File

@@ -0,0 +1,82 @@
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */
/* #undef C_ALLOCA */
/* Define to empty if the keyword does not work. */
/* #undef const */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
/* #undef CRAY_STACKSEG_END */
/* Define if you have alloca, as a function or macro. */
#define HAVE_ALLOCA 1
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#define HAVE_ALLOCA_H 1
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
/* #undef STACK_DIRECTION */
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if your <sys/time.h> declares struct tm. */
/* #undef TM_IN_SYS_TIME */
/* Define to use template STL (vs. wxSTL) */
#define wxUSE_TEMPLATE_STL 1
/* Define to use framelayout library */
/* #undef wxsUSE_FRAME_LAYOUT */
/* Define to use class-info plugin */
#define wxsUSE_CLASS_INFO 1
/* Define to use window manager plugin */
#define wxsUSE_WINDOWMANAGER 1
/* Define if you have the strdup function. */
#define HAVE_STRDUP 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Name of package */
#define PACKAGE "wxStudio"
/* Version number of package */
#define VERSION "0.0.2"

View File

@@ -0,0 +1,262 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 07/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __CONTROLAREA_G__
#define __CONTROLAREA_G__
#ifdef __GNUG__
#pragma interface "controlarea.h"
#endif
#include "wx/defs.h"
#include "wx/window.h"
#include "wx/string.h"
#define WXCONTROLAREA_VERSION 1.0
// layout types for title bars of the tabs
// (are selected up by evaluating the available free space )
class twTabInfo; // forward decl.
#define wxTITLE_IMG_AND_TEXT 0
#define wxTITLE_IMG_ONLY 1
#define wxTITLE_BORDER_ONLY 2
/*
* class manages and decorates contained "tab"-windows.
* Draws decorations similar to those in "Project Workplace"
* of Microsoft Developer Studio 4.xx
*/
class wxTabbedWindow : public wxPanel
{
DECLARE_DYNAMIC_CLASS( wxTabbedWindow )
public:
friend class wxTabbedWindowSerializer;
wxList mTabs;
int mActiveTab;
int mTitleHeight;
int mLayoutType;
void HideInactiveTabs( bool andRepaint );
// overrride,to provide different font for tab-labels
virtual wxFont GetLabelingFont();
// FOR NOW:: scrollbars are actually related to wxPaggedWindow
wxScrollBar* mpTabScroll;
wxScrollBar* mpHorizScroll;
wxScrollBar* mpVertScroll;
public:
// public properties (invoke ReclaclLayout(TRUE) to apply changes)
wxPen mWhitePen; // default: RGB(255,255,255)
wxPen mLightPen; // wxSYS_COLOUR_3DHIGHLIGHT
wxPen mGrayPen; // wxSYS_COLOUR_3DFACE
wxPen mDarkPen; // wxSYS_COLOUR_3DSHADOW
wxPen mBlackPen; // default: RGB( 0, 0, 0)
int mVertGap; // default: 3
int mHorizGap; // default: 5
int mTitleVertGap; // default: 3
int mTitleHorizGap; // default: 4
int mImageTextGap; // default: 2
int mFirstTitleGap; // default: 11
int mBorderOnlyWidth; // default: 8
// notifications (can be handled by derivatives)
virtual void OnTabAdded( twTabInfo* pInfo ) {}
virtual void SizeTabs(int x,int y, int width, int height, bool repant);
public:
wxTabbedWindow();
virtual ~wxTabbedWindow();
// tabs can be also added when the window is
// already displayed - "on the fly"
virtual void AddTab( wxWindow* pContent, // contained window
wxString tabText, // tab label
wxString imageFileName = "", // if "", only text label is displayed
long imageType = wxBITMAP_TYPE_BMP );
// NOTE:: if this AddTab(..) overload is called, the
// image bitmap will not be serialized (if performed),
// use the above method instead, so that images could
// be restored using the given file names
virtual void AddTab( wxWindow* pContent,
wxString tabText,
wxBitmap* pImage = NULL );
virtual void RemoveTab( int tabNo );
/* misc accessors */
virtual int GetTabCount();
virtual wxWindow* GetTab( int tabNo );
virtual wxWindow* GetActiveTab();
virtual void SetActiveTab( int tabNo );
void DrawShadedRect( int x, int y, int width, int height,
wxPen& upperPen, wxPen& lowerPen, wxDC& dc );
virtual void DrawDecorations( wxDC& dc );
// return -1, if non of the title bars was hitted,
// otherwise the index of the hitted tab title bar
virtual int HitTest( const wxPoint& pos );
// should be invoked to redisplay window with changed properties
virtual void RecalcLayout( bool andRepaint = TRUE );
// event handlers
void OnPaint( wxPaintEvent& event );
void OnSize ( wxSizeEvent& event );
void OnBkErase( wxEraseEvent& event );
void OnLButtonDown( wxMouseEvent& event );
DECLARE_EVENT_TABLE()
};
/*
* class manages and decorates contained "sheets" (or pages).
* Draws decorations similar to those in "Output window"
* of Microsoft Developer Studio 4.xx
*/
class wxPaggedWindow : public wxTabbedWindow
{
DECLARE_DYNAMIC_CLASS( wxPaggedWindow )
protected:
bool mScrollEventInProgress;
// drag&drop state variables
bool mIsDragged;
int mDagOrigin;
wxCursor mResizeCursor;
wxCursor mNormalCursor;
bool mCursorChanged;
int mOriginalTitleRowLen;
void DrawPaperBar( twTabInfo& tab, int x, int y,
wxBrush& brush, wxPen& pen, wxDC& dc );
int GetWholeTabRowLen();
// adjusts scorllbars to fit around tabs
virtual void OnTabAdded( twTabInfo* pInfo );
// sets smaller font for page-labels
virtual wxFont GetLabelingFont();
public:
int mTitleRowStart;
int mResizeNailGap;
int mTabTrianGap;
int mTitleRowLen; // actual title row length
int mAdjustableTitleRowLen; // setup by dragging mini-sash
// with the mosue pointer
int mCurentRowOfs;
wxBrush mGrayBrush;
wxBrush mWhiteBrush;
public:
wxPaggedWindow();
~wxPaggedWindow();
// NOTE:: use public methods of the base class
// to add "pages" to this window
/* misc accessors */
// below two methods should be called after
// the tabs were added (AddTab(..)). Set up
// these scrollbars to match the needs of the
// tabs added into this area
wxScrollBar& GetVerticalScrollBar();
wxScrollBar& GetHorizontalScrollBar();
virtual void DrawDecorations( wxDC& dc );
// return -1, if non of the title bars was hitted,
// otherwise the index of the hitted tab title bar
virtual int HitTest( const wxPoint& pos );
virtual void RecalcLayout( bool andRepaint = TRUE );
// event handlers
void OnPaint( wxPaintEvent& event );
void OnSize ( wxSizeEvent& event );
void OnLButtonDown( wxMouseEvent& event );
void OnLButtonUp ( wxMouseEvent& event );
void OnMouseMove ( wxMouseEvent& event );
void OnScroll ( wxScrollEvent& event );
DECLARE_EVENT_TABLE()
};
// helper structure of wxTabbedWindow
class twTabInfo : public wxObject
{
DECLARE_DYNAMIC_CLASS( twTabInfo )
public:
twTabInfo();
~twTabInfo();
int ImgWidth();
int ImgHeight();
int ImageToTxtGap( int prefGap );
bool HasImg();
wxBitmap& GetImg();
bool HasText();
wxString& GetText();
wxWindow& GetContent();
public:
wxWindow* mpContent;
wxBitmap mBitMap;
wxString mText;
wxSize mDims;
// used for serialization
wxString mImageFile;
long mImageType;
};
#endif

View File

@@ -0,0 +1,153 @@
/////////////////////////////////////////////////////////////////////////////
// Name: editorbase.h
// Purpose: General interfaces for editor plug-ins.
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 11/04/1999
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: GNU General Public License wxWindows licence v2.0
/////////////////////////////////////////////////////////////////////////////
#ifndef __EDITORBASE_G__
#define __EDITORBASE_G__
#include "plugin.h"
#include "wx/window.h"
class wxsSourceEditorPlugin : public wxsComponent
{
protected:
string mFileName;
public:
/*** overridables (with default implementations) ***/
// user-level commands
virtual void OnOpen( const string& fname ) = 0;
virtual void OnSave( const string& fname ) = 0;
virtual void OnCopy() {}
virtual void OnCut() {}
virtual void OnPaste() {}
virtual void OnDelete() {}
virtual void OnUndo() {}
virtual void OnRedo() {}
virtual void SelectAll() {}
// NOTE:: column -1 should result cursor to appear
// at the start of the first word in the line (if any)
virtual void OnGotoLine( int lineNo, int column = -1 ) {}
// should invoke editor's own "goto-line" dialog
virtual void OnGotoLine() {}
virtual void OnProperties() {}
virtual void OnFind() {}
virtual void OnFindNext() {}
virtual void OnFindPrevious() {}
virtual void OnReplace() {}
virtual void OnToggleBookmark() {}
virtual void OnNextBookmark() {}
virtual void OnPreviousBookmark() {}
virtual void OnShowBookmarks() {}
virtual void SetCheckpoint() {}
virtual bool CheckpointModified() { return TRUE; }
// UI-updates
virtual bool CanCopy() { return FALSE; }
virtual bool CanCut() { return FALSE; }
virtual bool CanPaste() { return FALSE; }
virtual bool CanUndo() { return FALSE; }
virtual bool CanRedo() { return FALSE; }
// accesed by framework
virtual bool IsModified() { return TRUE; }
// returned buffer is NULL, if operation is not supported
// by this concrete editor
virtual void GetAllText( char** ppBuf, size_t* length )
{ *ppBuf = NULL; *length = 0; }
virtual string FindWordAtCursor() = 0;
// returned line and column are -1s, if operation
// is not supported this concrete editor
virtual void GetCursorPos( int* line, int* column )
{ *line = -1; *column = -1; }
virtual void GetPagePos( int* line, int* column )
{ *line = -1; *column = -1; }
virtual void SetCursorPos( int line, int column ) {}
// returned buffer is NULL, if operation is not supported
// by this concrete editor,
// (NOTE: range is given from "fromLine", but not
// including tillLine, [fomrLine,tillLine) )
virtual void GetText( int fromLine, int fromColumn,
int tillLine, int tillColumn,
char** ppBuf, size_t* length )
{ ppBuf = NULL; }
virtual void InsertText( int line, int column,
char* text, size_t lenght )
{}
virtual void DeleteText( int fromLine, int fromColumn,
int tillLine, int tillColumn )
{}
virtual void PositionToXY( int line, int column, int* x, int* y )
{ *x = -1; *y = -1; }
virtual void GetSelectionRange( int* fromLine, int* fromColumn,
int* tillLine, int* tillColumn )
{ *fromLine = -1; // not supported by default
}
virtual wxSize GetCharacterSize() { return wxSize(-1,-1); }
virtual bool IsUnixText()
// default impl., actual implementation should use auto-detection
#ifdef __WINDOWS__
{ return FALSE; }
#else
{ return TRUE; }
#endif
// requests editor to keep cursor blinking, even when
// the window has lost it's focus
virtual void HoldCursor( bool hold )
{}
virtual string GetFileName() { return mFileName; }
virtual void SetFileName( const string& fname ) { mFileName = fname; }
// overriden methods of wxStudioPluginBase
virtual WXS_PLUGIN_TYPE GetType() {return WXS_EDITOR_PLUGIN;}
virtual string GetCategory() { return "Editor";}
};
#endif
// __EDITORBASE_G__

View File

@@ -0,0 +1,146 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 08/05/1999
// RCS-ID: $Id$
// Copyright: (c) Aleksandars Gluchovas
// Licence: GNU General Public License
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "finddlg.h"
/***** Implementation for class wxFindTextDialog *****/
//#define wxID_OK 3453453
BEGIN_EVENT_TABLE( wxFindTextDialog, wxDialog )
// FIXME:: why OnOk() is not called??
//EVT_BUTTON( wxID_OK, wxFindTextDialog::OnOK )
EVT_CHAR_HOOK(wxFindTextDialog::OnKeyHook)
END_EVENT_TABLE()
wxString wxFindTextDialog::mLastExpr;
bool wxFindTextDialog::mMatchCase = TRUE;
bool wxFindTextDialog::mMatchWord = FALSE;
StrListT wxFindTextDialog::mExprList;
// FIXME:: workaround for mystic. crashes wiht MSDev4.0
static wxComboBox* __gpCombo = NULL;
wxFindTextDialog::wxFindTextDialog( wxWindow* parent, const string& expr )
: wxDialog( parent, -1, "Find",
wxDefaultPosition, wxSize( 335, 130 ),
wxDIALOG_MODAL | wxCAPTION | wxTAB_TRAVERSAL |
wxDEFAULT_DIALOG_STYLE
)
{
mLastExpr = expr;
int leftMargin = 20;
int inputY = 20;
int inputWidth = 200;
wxStaticText* pStatic =
new wxStaticText( this, -1, "Fi&nd what:",
wxPoint( leftMargin, inputY ) );
int checkY = inputY + 25;
mpWordCheck = new wxCheckBox( this, -1, "Match &whole word only",
wxPoint( leftMargin, checkY ) );
mpCaseCheck = new wxCheckBox( this, -1, "Match &case",
wxPoint( leftMargin, checkY + 20 ) );
mpCaseCheck->SetValue( mMatchCase );
mpWordCheck->SetValue( mMatchWord );
int btnX = inputWidth + leftMargin + 23;
int btnY = inputY - 4;
wxSize btnSize( 70, 25 );
wxButton* pOkBtn = new wxButton( this, wxID_OK, "&Find",
wxPoint( btnX, btnY ), btnSize );
wxButton* pCancelBtn = new wxButton( this, wxID_CANCEL, "&Cancel",
wxPoint( btnX, btnY + 10 + btnSize.y ), btnSize );
__gpCombo = new wxComboBox( this, -1, mLastExpr,
wxPoint( leftMargin + 60, inputY - 2 ),
wxSize( inputWidth - 50, 20 ) );
for( size_t i = 0; i != mExprList.size(); ++i )
__gpCombo->Append( mExprList[i] );
pOkBtn->SetDefault();
__gpCombo->SetFocus();
Center( wxBOTH );
}
void wxFindTextDialog::SetExpr( const wxString& expr )
{
mLastExpr = expr;
__gpCombo->SetValue( mLastExpr );
}
wxComboBox* wxFindTextDialog::GetCombo()
{
return __gpCombo;
}
bool wxFindTextDialog::TransferDataFromWindow()
{
mLastExpr = GetCombo()->GetValue();
mMatchCase = mpCaseCheck->GetValue();
mMatchWord = mpWordCheck->GetValue();
if ( mLastExpr != "" )
{
for( size_t i = 0; i != mExprList.size(); ++i )
if ( mExprList[i] == mLastExpr )
return TRUE;
}
if ( mExprList.size() > 20 )
mExprList.pop_back();
mExprList.push_back( mLastExpr );
return TRUE;
}
void wxFindTextDialog::OnKeyHook( wxKeyEvent& event )
{
if ( event.m_keyCode == WXK_RETURN )
{
TransferDataFromWindow();
EndModal( wxID_OK );
}
else
event.Skip();
}

View File

@@ -0,0 +1,38 @@
#ifndef __FINDDLG_G__
#define __FINDDLG_G__
#include "wx/dialog.h"
#include "wx/checkbox.h"
#include "wx/combobox.h"
#include "wxstldefs.h"
class wxFindTextDialog : public wxDialog
{
public:
static wxString mLastExpr;
static bool mMatchCase;
static bool mMatchWord;
static StrListT mExprList;
wxCheckBox* mpCaseCheck;
wxCheckBox* mpWordCheck;
public:
wxFindTextDialog( wxWindow* parent, const string& expr = "" );
bool MatchWordOn() { return mMatchWord; }
bool MatchCaseOn() { return mMatchCase; }
wxString GetExpr() { return mLastExpr; }
void SetExpr( const wxString& expr );
wxComboBox* GetCombo();
virtual bool TransferDataFromWindow();
void OnKeyHook( wxKeyEvent& event );
DECLARE_EVENT_TABLE()
};
#endif

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,189 @@
# This file was created automatically by SWIG.
import lseditorc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from events import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
import wx
class wxsLSEditorPluginPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self,lseditorc=lseditorc):
if self.thisown == 1 :
lseditorc.delete_wxsLSEditorPlugin(self)
def Create(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_Create,(self,) + _args, _kwargs)
return val
def OnOpen(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnOpen,(self,) + _args, _kwargs)
return val
def OnSave(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnSave,(self,) + _args, _kwargs)
return val
def OnCopy(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnCopy,(self,) + _args, _kwargs)
return val
def OnCut(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnCut,(self,) + _args, _kwargs)
return val
def OnPaste(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnPaste,(self,) + _args, _kwargs)
return val
def OnDelete(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnDelete,(self,) + _args, _kwargs)
return val
def OnUndo(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnUndo,(self,) + _args, _kwargs)
return val
def OnRedo(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnRedo,(self,) + _args, _kwargs)
return val
def SelectAll(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_SelectAll,(self,) + _args, _kwargs)
return val
def OnGotoLine(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnGotoLine,(self,) + _args, _kwargs)
return val
def OnProperties(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnProperties,(self,) + _args, _kwargs)
return val
def OnFind(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnFind,(self,) + _args, _kwargs)
return val
def OnFindNext(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnFindNext,(self,) + _args, _kwargs)
return val
def OnFindPrevious(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnFindPrevious,(self,) + _args, _kwargs)
return val
def OnReplace(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnReplace,(self,) + _args, _kwargs)
return val
def OnToggleBookmark(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnToggleBookmark,(self,) + _args, _kwargs)
return val
def OnNextBookmark(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnNextBookmark,(self,) + _args, _kwargs)
return val
def OnPreviousBookmark(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnPreviousBookmark,(self,) + _args, _kwargs)
return val
def OnShowBookmarks(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnShowBookmarks,(self,) + _args, _kwargs)
return val
def SetCheckpoint(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_SetCheckpoint,(self,) + _args, _kwargs)
return val
def CheckpointModified(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CheckpointModified,(self,) + _args, _kwargs)
return val
def CanCopy(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CanCopy,(self,) + _args, _kwargs)
return val
def CanCut(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CanCut,(self,) + _args, _kwargs)
return val
def CanPaste(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CanPaste,(self,) + _args, _kwargs)
return val
def CanUndo(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CanUndo,(self,) + _args, _kwargs)
return val
def CanRedo(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CanRedo,(self,) + _args, _kwargs)
return val
def GetName(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetName,(self,) + _args, _kwargs)
return val
def IsModified(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_IsModified,(self,) + _args, _kwargs)
return val
def GetWindow(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetWindow,(self,) + _args, _kwargs)
if val: val = wxWindowPtr(val)
return val
def SetFileName(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_SetFileName,(self,) + _args, _kwargs)
return val
def HoldCursor(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_HoldCursor,(self,) + _args, _kwargs)
return val
def FindWordAtCursor(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_FindWordAtCursor,(self,) + _args, _kwargs)
return val
def GetCursorPos(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetCursorPos,(self,) + _args, _kwargs)
return val
def SetCursorPos(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_SetCursorPos,(self,) + _args, _kwargs)
return val
def GetPagePos(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetPagePos,(self,) + _args, _kwargs)
return val
def GetText(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetText,(self,) + _args, _kwargs)
return val
def InsertText(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_InsertText,(self,) + _args, _kwargs)
return val
def DeleteText(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_DeleteText,(self,) + _args, _kwargs)
return val
def PositionToXY(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_PositionToXY,(self,) + _args, _kwargs)
return val
def GetSelectionRange(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetSelectionRange,(self,) + _args, _kwargs)
return val
def GetCharacterSize(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetCharacterSize,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def IsUnixText(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_IsUnixText,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxsLSEditorPlugin instance at %s>" % (self.this,)
class wxsLSEditorPlugin(wxsLSEditorPluginPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(lseditorc.new_wxsLSEditorPlugin,_args,_kwargs)
self.thisown = 1
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------

View File

@@ -0,0 +1,150 @@
/////////////////////////////////////////////////////////////////////////////
// Name: utils.i
// Purpose: SWIG definitions of various utility classes
//
// Author: Robin Dunn
//
// Created: 25-nov-1998
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module lseditor
%{
#include "helpers.h"
#include "lseditorpl.h"
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%extern windows.i
%extern windows2.i
%extern windows3.i
%extern frames.i
%extern _defs.i
%extern misc.i
%extern gdi.i
%extern controls.i
%extern events.i
%{
#ifdef SEPARATE
wxString wxPyEmptyStr("");
#endif
%}
%pragma(python) code = "import wx"
//---------------------------------------------------------------------------
class wxsLSEditorPlugin
{
public:
wxsLSEditorPlugin();
~wxsLSEditorPlugin();
void Create( wxWindow* parent, wxWindowID id );
virtual void OnOpen( const char* fname );
virtual void OnSave( const char* fname );
virtual void OnCopy();
virtual void OnCut();
virtual void OnPaste();
virtual void OnDelete();
void OnUndo();
void OnRedo();
void SelectAll();
void OnGotoLine( int lineNo, int column = 0 );
void OnGotoLine();
void OnProperties();
void OnFind();
void OnFindNext();
void OnFindPrevious();
void OnReplace();
virtual void OnToggleBookmark();
virtual void OnNextBookmark();
virtual void OnPreviousBookmark();
virtual void OnShowBookmarks();
virtual void SetCheckpoint();
virtual bool CheckpointModified();
// UI-updates
bool CanCopy();
bool CanCut();
bool CanPaste();
bool CanUndo();
bool CanRedo();
// accesed by framework
virtual string GetName(){ return "Alex's Language Sensitive Editor"; }
virtual bool IsModified();
virtual wxWindow* GetWindow();
//virtual void GetAllText( char** ppBuf, size_t* length );
virtual void SetFileName( const char* fname );
virtual void HoldCursor( bool hold );
//virtual wxsPluginBase* Clone() { return new wxsLSEditorPlugin(); };
virtual string FindWordAtCursor();
virtual void GetCursorPos( int* line, int* column );
virtual void SetCursorPos( int line, int column );
virtual void GetPagePos( int* line, int* column );
virtual void GetText( int fromLine, int fromColumn,
int tillLine, int tillColumn,
char** ppBuf, size_t* length );
virtual void InsertText( int line, int column,
char* text, size_t lenght );
virtual void DeleteText( int fromLine, int fromColumn,
int tillLine, int tillColumn );
virtual void PositionToXY( int line, int column, int* x, int* y );
virtual void GetSelectionRange( int* fromLine, int* fromColumn,
int* tillLine, int* tillColumn );
virtual wxSize GetCharacterSize();
virtual bool IsUnixText();
// some extras (just in case..)
//wxTextEditorModel& GetModel();
//wxTextEditorView& GetView();
};
//---------------------------------------------------------------------------
%init %{
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
%}
//---------------------------------------------------------------------------

View File

@@ -0,0 +1,2 @@
EXPORTS
initlseditorc

View File

@@ -0,0 +1,344 @@
/////////////////////////////////////////////////////////////////////////////
// Name: lseditorpl.cpp
// Purpose: Language-sensative editor plugin for wxStudio
// Copyright: (c) Aleksandars Gluchovas
// Modified by:
// Created: 11/04/1999
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: GNU General Public License
/////////////////////////////////////////////////////////////////////////////
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "lseditorpl.h"
#include "tdefs.h"
/***** Impelmentation for class wxsLSEditorPlugin *****/
wxsLSEditorPlugin::wxsLSEditorPlugin()
: mpModel( NULL ),
mpView( NULL )
{}
wxsLSEditorPlugin::~wxsLSEditorPlugin()
{
// view is destroyed by wxWindows along
// with it's owned model
}
void wxsLSEditorPlugin::Create( wxWindow* parent, wxWindowID id )
{
mpModel = new wxTextEditorModel();
mpView = new wxTextEditorView( parent, id, mpModel );
mpModel->AddView( mpView );
mpView->Activate();
mpView->AddPinPainter( new TBreakpointPainter() );
mpView->SyncScrollbars();
}
void wxsLSEditorPlugin::OnOpen( const string& fname )
{
mpModel->LoadTextFromFile( fname );
SetFileName( fname );
}
void wxsLSEditorPlugin::OnSave( const string& fname )
{
mpModel->SaveTextToFile( fname );
}
void wxsLSEditorPlugin::OnCopy()
{
mpModel->OnCopy();
}
void wxsLSEditorPlugin::OnCut()
{
mpModel->OnCut();
}
void wxsLSEditorPlugin::OnPaste()
{
mpModel->OnPaste();
}
void wxsLSEditorPlugin::OnDelete()
{
mpModel->OnDelete();
}
void wxsLSEditorPlugin::OnUndo()
{
mpModel->OnUndo();
}
void wxsLSEditorPlugin::OnRedo()
{
mpModel->OnRedo();
}
void wxsLSEditorPlugin::SelectAll()
{
mpModel->OnSelectAll();
}
void wxsLSEditorPlugin::OnGotoLine()
{
mpModel->OnGotoLine();
}
void wxsLSEditorPlugin::OnGotoLine( int lineNo, int column )
{
mpModel->ResetSelection();
mpModel->OnGotoLine( lineNo, column );
}
void wxsLSEditorPlugin::OnProperties()
{
// not impl.
}
void wxsLSEditorPlugin::OnFind()
{
mpModel->OnFind();
}
void wxsLSEditorPlugin::OnFindNext()
{
mpModel->OnFindNext();
}
void wxsLSEditorPlugin::OnFindPrevious()
{
mpModel->OnFindPrevious();
}
void wxsLSEditorPlugin::OnReplace()
{
// not impl.
}
void wxsLSEditorPlugin::OnToggleBookmark()
{
mpModel->OnToggleBookmark();
}
void wxsLSEditorPlugin::OnNextBookmark()
{
mpModel->OnNextBookmark();
}
void wxsLSEditorPlugin::OnPreviousBookmark()
{
mpModel->OnPreviousBookmark();
}
void wxsLSEditorPlugin::OnShowBookmarks()
{
// not impl.
}
void wxsLSEditorPlugin::SetCheckpoint()
{
mpModel->SetCheckpoint();
}
bool wxsLSEditorPlugin::CheckpointModified()
{
return mpModel->CheckpointModified();
}
// UI-updates
bool wxsLSEditorPlugin::CanCopy()
{
return mpModel->CanCopy();
}
bool wxsLSEditorPlugin::CanCut()
{
return mpModel->CanCopy();
}
bool wxsLSEditorPlugin::CanPaste()
{
return mpModel->CanPaste();
}
bool wxsLSEditorPlugin::CanUndo()
{
return mpModel->CanUndo();
}
bool wxsLSEditorPlugin::CanRedo()
{
return mpModel->CanRedo();
}
// accesed by framework
bool wxsLSEditorPlugin::IsModified()
{
return mpModel->IsModified();
}
wxWindow* wxsLSEditorPlugin::GetWindow()
{
return mpView;
}
void wxsLSEditorPlugin::GetAllText( char** ppBuf, size_t* length )
{
mpModel->GetAllText( ppBuf, *length );
}
void wxsLSEditorPlugin::SetFileName( const string& fname )
{
mFileName = fname;
if ( mpView )
mpView->SetName( fname );
}
void wxsLSEditorPlugin::HoldCursor( bool hold )
{
mpView->HoldCursor( hold );
}
string wxsLSEditorPlugin::FindWordAtCursor()
{
mpModel->OnSelectWord();
char* buf = NULL; size_t len = 0;
mpModel->GetSelection( &buf, len );
if ( buf )
{
string word = string( buf, 0, len );
delete [] buf;
return word;
}
else
return "";
}
void wxsLSEditorPlugin::GetCursorPos( int* line, int* column )
{
TPosition pos = mpModel->GetCursor();
*line = (int)pos.mRow;
*column = (int)pos.mCol;
}
void wxsLSEditorPlugin::SetCursorPos( int line, int column )
{
mpModel->OnGotoLine( line, column );
}
void wxsLSEditorPlugin::GetPagePos( int* line, int* column )
{
TPosition pos = mpView->GetPagePos();
*line = pos.mRow;
*column = pos.mCol;
}
void wxsLSEditorPlugin::GetText( int fromLine, int fromColumn,
int tillLine, int tillColumn,
char** ppBuf, size_t* length )
{
mpModel->GetTextFromRange( TPosition( fromLine, fromColumn ),
TPosition( tillLine, tillColumn ),
ppBuf, *length );
}
void wxsLSEditorPlugin::InsertText( int line, int column,
char* text, size_t lenght )
{
mpModel->InsertText( TPosition( line, column ),
text, lenght );
}
void wxsLSEditorPlugin::DeleteText( int fromLine, int fromColumn,
int tillLine, int tillColumn )
{
mpModel->DeleteRange( TPosition( fromLine, fromColumn ),
TPosition( tillLine, tillColumn ) );
}
void wxsLSEditorPlugin::PositionToXY( int line, int column, int* x, int* y )
{
TPosition scrPos;
mpView->TextPosToScreenPos( TPosition( line, column ), scrPos );
mpView->ScreenPosToPixels( scrPos, *x, *y );
*y += mpView->mCharDim.y; // lower-right corner
}
void wxsLSEditorPlugin::GetSelectionRange( int* fromLine, int* fromColumn,
int* tillLine, int* tillColumn )
{
TPosition start = mpModel->GetStartOfSelection();
TPosition end = mpModel->GetEndOfSelection();
*fromLine = (int)start.mRow;
*fromColumn = (int)start.mCol;
*tillLine = (int)end.mRow;
*tillColumn = (int)end.mCol;
}
wxSize wxsLSEditorPlugin::GetCharacterSize()
{
return mpView->GetCharacterSize();
}
bool wxsLSEditorPlugin::IsUnixText()
{
return mpModel->IsUnixText();
}
wxTextEditorModel& wxsLSEditorPlugin::GetModel()
{
return *mpModel;
}
wxTextEditorView& wxsLSEditorPlugin::GetView()
{
return *mpView;
}

View File

@@ -0,0 +1,133 @@
/////////////////////////////////////////////////////////////////////////////
// Name: nativeeditorpl.h
// Purpose: Language-sensative editor plugin for wxStudio
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 11/04/1999
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: GNU General Public License
/////////////////////////////////////////////////////////////////////////////
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/////////////////////////////////////////////////////////////////////////////
#ifndef __LSEDITORPL_G__
#define __LSEDITORPL_G__
#include "editorpl.h"
class wxTextEditorModel;
class wxTextEditorView;
class wxsLSEditorPlugin : public wxsSourceEditorPlugin
{
protected:
wxTextEditorModel* mpModel;
wxTextEditorView* mpView;
public:
wxsLSEditorPlugin();
~wxsLSEditorPlugin();
void Create( wxWindow* parent, wxWindowID id );
virtual void OnOpen( const string& fname );
virtual void OnSave( const string& fname );
virtual void OnCopy();
virtual void OnCut();
virtual void OnPaste();
virtual void OnDelete();
void OnUndo();
void OnRedo();
void SelectAll();
void OnGotoLine( int lineNo, int column = 0 );
void OnGotoLine();
void OnProperties();
void OnFind();
void OnFindNext();
void OnFindPrevious();
void OnReplace();
virtual void OnToggleBookmark();
virtual void OnNextBookmark();
virtual void OnPreviousBookmark();
virtual void OnShowBookmarks();
virtual void SetCheckpoint();
virtual bool CheckpointModified();
// UI-updates
bool CanCopy();
bool CanCut();
bool CanPaste();
bool CanUndo();
bool CanRedo();
// accesed by framework
virtual string GetName(){ return "Alex's Language Sensitive Editor"; }
virtual bool IsModified();
virtual wxWindow* GetWindow();
virtual void GetAllText( char** ppBuf, size_t* length );
virtual void SetFileName( const string& fname );
virtual void HoldCursor( bool hold );
virtual wxsPluginBase* Clone() { return new wxsLSEditorPlugin(); };
virtual string FindWordAtCursor();
virtual void GetCursorPos( int* line, int* column );
virtual void SetCursorPos( int line, int column );
virtual void GetPagePos( int* line, int* column );
virtual void GetText( int fromLine, int fromColumn,
int tillLine, int tillColumn,
char** ppBuf, size_t* length );
virtual void InsertText( int line, int column,
char* text, size_t lenght );
virtual void DeleteText( int fromLine, int fromColumn,
int tillLine, int tillColumn );
virtual void PositionToXY( int line, int column, int* x, int* y );
virtual void GetSelectionRange( int* fromLine, int* fromColumn,
int* tillLine, int* tillColumn );
virtual wxSize GetCharacterSize();
virtual bool IsUnixText();
// some extras (just in case..)
wxTextEditorModel& GetModel();
wxTextEditorView& GetView();
};
#endif
// __LSEDITORPL_G__

View File

@@ -0,0 +1,46 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 22/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: GNU General Public License
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "markup.h"
static TagStructT htmlTags[] =
{
{ "<b>","</b>" }, // 0
{ "<i>","</i>" }, // 1
{ "<pre>","</pre>" }, // 2
{ "<font color=\"#000000\">","</font>" }, // 3
{ "<font color=\"#8F0000\">","</font>" }, // 4
{ "<font color=\"#008F00\">","</font>" }, // 5
{ "<font color=\"#0000CF\">","</font>" }, // 6
{ "<p>","</p>" }, // 7
{ "<br>","" }, // 8
{ "<h1>","</h1>" }, // 9
{ "<h2>","</h2>" }, // 10
{ "<h3>","</h3>" }, // 11
{ "<ul>","</ul>" }, // 12
{ "<li>","</li>" }, // 13
};
MarkupTagsT get_HTML_markup_tags()
{
return htmlTags;
}

View File

@@ -0,0 +1,51 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 22/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: GNU General Public License
/////////////////////////////////////////////////////////////////////////////
#ifndef __MARKUP_G__
#define __MARKUP_G__
// indicies for the MarkupTagsT array
#define TAG_BOLD 0
#define TAG_ITALIC 1
#define TAG_FIXED_FONT 2
#define TAG_BLACK_FONT 3
#define TAG_RED_FONT 4
#define TAG_GREEN_FONT 5
#define TAG_BLUE_FONT 6
#define TAG_PARAGRAPH 7
#define TAG_NEW_LINE 8
#define TAG_HEADING_1 9
#define TAG_HEADING_2 10
#define TAG_HEADING_3 11
#define TAG_ITEM_LIST 12
#define TAG_LIST_ITEM 13
struct TagStructT
{
char* start; // tag that starts style
char* end; // tag that finishes style
};
// tag array
typedef TagStructT* MarkupTagsT;
// returns array of TagStructT with tag strings for HTML
MarkupTagsT get_HTML_markup_tags();
// MarkupTagsT get_PostScript_markup_tags();
// MarkupTagsT get_Latex_markup_tags();
#endif

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,189 @@
# This file was created automatically by SWIG.
import lseditorc
from misc import *
from misc2 import *
from windows import *
from gdi import *
from events import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
import wx
class wxsLSEditorPluginPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self,lseditorc=lseditorc):
if self.thisown == 1 :
lseditorc.delete_wxsLSEditorPlugin(self)
def Create(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_Create,(self,) + _args, _kwargs)
return val
def OnOpen(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnOpen,(self,) + _args, _kwargs)
return val
def OnSave(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnSave,(self,) + _args, _kwargs)
return val
def OnCopy(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnCopy,(self,) + _args, _kwargs)
return val
def OnCut(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnCut,(self,) + _args, _kwargs)
return val
def OnPaste(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnPaste,(self,) + _args, _kwargs)
return val
def OnDelete(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnDelete,(self,) + _args, _kwargs)
return val
def OnUndo(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnUndo,(self,) + _args, _kwargs)
return val
def OnRedo(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnRedo,(self,) + _args, _kwargs)
return val
def SelectAll(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_SelectAll,(self,) + _args, _kwargs)
return val
def OnGotoLine(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnGotoLine,(self,) + _args, _kwargs)
return val
def OnProperties(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnProperties,(self,) + _args, _kwargs)
return val
def OnFind(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnFind,(self,) + _args, _kwargs)
return val
def OnFindNext(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnFindNext,(self,) + _args, _kwargs)
return val
def OnFindPrevious(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnFindPrevious,(self,) + _args, _kwargs)
return val
def OnReplace(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnReplace,(self,) + _args, _kwargs)
return val
def OnToggleBookmark(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnToggleBookmark,(self,) + _args, _kwargs)
return val
def OnNextBookmark(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnNextBookmark,(self,) + _args, _kwargs)
return val
def OnPreviousBookmark(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnPreviousBookmark,(self,) + _args, _kwargs)
return val
def OnShowBookmarks(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_OnShowBookmarks,(self,) + _args, _kwargs)
return val
def SetCheckpoint(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_SetCheckpoint,(self,) + _args, _kwargs)
return val
def CheckpointModified(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CheckpointModified,(self,) + _args, _kwargs)
return val
def CanCopy(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CanCopy,(self,) + _args, _kwargs)
return val
def CanCut(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CanCut,(self,) + _args, _kwargs)
return val
def CanPaste(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CanPaste,(self,) + _args, _kwargs)
return val
def CanUndo(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CanUndo,(self,) + _args, _kwargs)
return val
def CanRedo(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_CanRedo,(self,) + _args, _kwargs)
return val
def GetName(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetName,(self,) + _args, _kwargs)
return val
def IsModified(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_IsModified,(self,) + _args, _kwargs)
return val
def GetWindow(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetWindow,(self,) + _args, _kwargs)
if val: val = wxWindowPtr(val)
return val
def SetFileName(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_SetFileName,(self,) + _args, _kwargs)
return val
def HoldCursor(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_HoldCursor,(self,) + _args, _kwargs)
return val
def FindWordAtCursor(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_FindWordAtCursor,(self,) + _args, _kwargs)
return val
def GetCursorPos(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetCursorPos,(self,) + _args, _kwargs)
return val
def SetCursorPos(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_SetCursorPos,(self,) + _args, _kwargs)
return val
def GetPagePos(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetPagePos,(self,) + _args, _kwargs)
return val
def GetText(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetText,(self,) + _args, _kwargs)
return val
def InsertText(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_InsertText,(self,) + _args, _kwargs)
return val
def DeleteText(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_DeleteText,(self,) + _args, _kwargs)
return val
def PositionToXY(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_PositionToXY,(self,) + _args, _kwargs)
return val
def GetSelectionRange(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetSelectionRange,(self,) + _args, _kwargs)
return val
def GetCharacterSize(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_GetCharacterSize,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def IsUnixText(self, *_args, **_kwargs):
val = apply(lseditorc.wxsLSEditorPlugin_IsUnixText,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxsLSEditorPlugin instance at %s>" % (self.this,)
class wxsLSEditorPlugin(wxsLSEditorPluginPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(lseditorc.new_wxsLSEditorPlugin,_args,_kwargs)
self.thisown = 1
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------

View File

@@ -0,0 +1,58 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wxsplbase.cpp
// Purpose: General interfaces for all plug-ins in wxStudio
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 11/04/1999
// RCS-ID: $Id$
// Copyright: (c) Aleksandars Gluchovas
// Licence: GNU General Public License wxWindows licence v2.0
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "plugin.h"
/***** Implementation for class wxStudioPluginManager *****/
void wxsPluginManager::RegisterMenuCommand( const wxString& itemName,
const wxString& menuName,
int id,
wxsPluginBase* forPlugin )
{
// TBD::
}
void wxsPluginManager::UnregisterPlugin( wxsPluginBase* plugin )
{
// TBD::
}
/***** Implementation for class wxStudioPluginBase *****/
wxsPluginBase::wxsPluginBase()
{}
wxsPluginBase::~wxsPluginBase()
{}
wxsPluginManager& wxsPluginBase::GetPluginManager()
{
wxASSERT( mpPluginMgr );
return *mpPluginMgr;
}
void wxsPluginBase::SetPluginManager( wxsPluginManager* pMgr )
{
mpPluginMgr = pMgr;
}

View File

@@ -0,0 +1,98 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wxsplbase.h
// Purpose: General interfaces for all plug-ins in wxStudio
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 11/04/1999
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: GNU General Public License wxWindows licence v2.0
/////////////////////////////////////////////////////////////////////////////
#ifndef __PLUGIN_G__
#define __PLUGIN_G__
#include "wxstldefs.h"
#include "wxsdefs.h"
class wxsPluginBase;
typedef wxsPluginBase* wxsPluginBasePtrT;
#ifdef wxUSE_TEMPLATE_STL
typedef vector<wxsPluginBasePtrT> wxsPluginListT;
#else
typedef WXSTL_VECTOR_SHALLOW_COPY(wxsPluginBasePtrT) wxsPluginListT;
#endif
class wxsPluginManager : public wxObject
{
public:
wxsPluginListT& GetPlugins();
// allows to present plugin-specific features
// as items in the menu-bar
void RegisterMenuCommand( const string& itemName,
const string& menuName,
int id,
wxsPluginBase* forPlugin );
// should be called by plugin, when it's being destroyed
void UnregisterPlugin( wxsPluginBase* plugin );
};
// Used by create settings panel:
enum {
WXS_SETTINGS_GLOBAL,
WXS_SETTINGS_PROJECT
};
class wxsPluginBase : public wxObject
{
protected:
wxsPluginManager* mpPluginMgr;
public:
wxsPluginBase();
virtual ~wxsPluginBase();
virtual void InitPlugin() {}
// utilities
wxsPluginManager& GetPluginManager();
void SetPluginManager( wxsPluginManager* mgr );
// overridables
// Current Types = UNKNOWN,EDITOR,CLASSBROWSER,FILEBROWSER,CLASSINFO,TOOL
virtual WXS_PLUGIN_TYPE GetType() = 0;
virtual string GetCategory() = 0;
virtual string GetName() = 0;
// will return a help panel
virtual wxWindow* CreateSettingsPanel(wxWindow *parent, int type) {return NULL;}
virtual wxsPluginBase* Clone() = 0;
virtual string Command( const string& name, const string& args )
{ return "NO_SUPPORTED"; }
};
// base clas for all plugins which are presented as windows
class wxsComponent : public wxsPluginBase
{
public:
virtual void Create( wxWindow* parent, wxWindowID id ) = 0;
virtual wxWindow* GetWindow() = 0;
};
#endif
// __PLUGIN_G__

View File

@@ -0,0 +1,696 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 22/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandars Gluchovas
// Licence: GNU General Public License
/////////////////////////////////////////////////////////////////////////////
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "config.h"
#if defined( wxUSE_TEMPLATE_STL )
#include <map>
using namespace std;
#else
#include <wxstlac.h>
#endif
#include "sourcepainter.h"
const int MAX_KEYWORD_LEN = 16;
struct KeywordT
{
char keyWord[MAX_KEYWORD_LEN];
int rank;
};
// source fragment ranks :
// 0 - nomral text
// 1 - basic types
// 2 - reserved words
// multil-language keywords map
static KeywordT __gKeyWords[] =
{
{ "for", 1 },
{ "FOR", 1 },
{ "For", 1 },
{ "next", 1 },
{ "Next", 1 },
{ "NEXT", 1 },
{ "if", 1 },
{ "If", 1 },
{ "IF", 1 },
{ "then", 1 },
{ "Then", 1 },
{ "THEN", 1 },
{ "else", 1 },
{ "Else", 1 },
{ "ELSE", 1 },
{ "do", 1 },
{ "Do", 1 },
{ "DO", 1 },
{ "break", 1 },
{ "Break", 1 },
{ "BREAK", 1 },
{ "continue", 1 },
{ "goto", 1 },
{ "Goto", 1 },
{ "GOTO", 1 },
{ "switch", 1 },
{ "default", 1 },
{ "case", 1 },
{ "repeat", 1 },
{ "Repeat", 1 },
{ "REPEAT", 1 },
{ "until", 1 },
{ "Until", 1 },
{ "UNTIL", 1 },
{ "return", 1 },
{ "Return", 1 },
{ "RETURN", 1 },
{ "unit", 1 },
{ "Unit", 1 },
{ "UNIT", 1 },
{ "procedure", 1 },
{ "Procedure", 1 },
{ "PROCEDURE", 1 },
{ "function", 1 },
{ "Function", 1 },
{ "FUNCTION", 1 },
{ "begin", 1 },
{ "Begin", 1 },
{ "BEGIN", 1 },
{ "End", 1 },
{ "END", 1 },
////////////////////////////////////////////////////
{ "enum", 1 },
{ "static", 1 },
{ "const", 1 },
{ "mutable", 1 },
{ "volatile", 1 },
{ "__asm", 1 },
{ "asm", 1 },
{ "typeid", 1 },
{ "sizeof", 1 },
{ "typeof", 1 },
{ "native", 1 },
{ "#include", 1 },
{ "#define", 1 },
{ "#def", 1 },
{ "#undef", 1 },
{ "#ifdef", 1 },
{ "#ifndef", 1 },
{ "#if", 1 },
{ "#endif", 1 },
{ "#elif", 1 },
{ "#else", 1 },
{ "#pragma", 1 },
{ "#line", 1 },
{ "package", 1 },
{ "import", 1 },
{ "export", 1 },
////////////////////////////////////////////////////
{ "dynamic_cast", 1 },
{ "const_cast", 1 },
//////// some hacks for VB /////////
{ "sub", 1 },
{ "Sub", 1 },
{ "SUB", 1 },
{ "as", 1 },
{ "As", 1 },
{ "AS", 1 },
/////// data types ///////
{ "int" , 1 },
{ "integer", 1 },
{ "Integer", 1 },
{ "INTEGER", 1 },
{ "real", 1 },
{ "Real", 1 },
{ "REAL", 1 },
{ "float", 1 },
{ "Float", 1 },
{ "FLOAT", 1 },
{ "char", 1 },
{ "Char", 1 },
{ "CHAR", 1 },
{ "register", 1 },
{ "string", 1 },
{ "String", 1 },
{ "STRING", 1 },
{ "array", 1 },
{ "Array", 1 },
{ "ARRAY", 1 },
{ "packed", 1 },
{ "Packed", 1 },
{ "PACKED", 1 },
{ "property", 1 },
{ "Property", 1 },
{ "PROPERTY", 1 },
{ "unsigned", 1 },
{ "long", 1 },
{ "double", 1 },
{ "short", 1 },
{ "bool", 1 },
{ "longint", 1 },
{ "Longint", 1 },
{ "LONGINT", 1 },
{ "extended", 1 },
{ "Extended", 1 },
{ "EXTENTED", 1 },
{ "pointer", 1 },
{ "Pointer", 1 },
{ "POINTER", 1 },
{ "and", 1 },
{ "And", 1 },
{ "AND", 1 },
{ "or", 1 },
{ "Or", 1 },
{ "OR", 1 },
{ "xor", 1 },
{ "Xor", 1 },
{ "XOR", 1 },
{ "void", 1 },
{ "__stdcall", 1 },
{ "__declspec", 1 },
{ "extern", 1 },
{ "stdcall", 1 },
{ "dllimport", 1 },
{ "dllexport", 1 },
{ "__cdecl", 1 },
{ "cdecl", 1 },
{ "template", 1 },
{ "typedef", 1 },
{ "naked", 1 },
{ "try", 1 },
{ "catch", 1 },
{ "throw", 2 }, // C++
{ "throws", 1 }, // Java
{ "finalize", 1 },
// "STL-suport"
{ "size_t", 1 },
{ "NPOS", 1 },
{ "vector", 1 },
{ "list", 1 },
{ "map", 1 },
{ "multimap", 1 },
{ "external", 1 },
{ "External", 1 },
{ "EXTERNAL", 1 },
//////////// meta-information //////////////
{ "virtual", 2 },
{ "Virtual", 2 },
{ "override", 2 },
{ "Override", 2 },
{ "class", 2 },
{ "Class", 2 },
{ "CLASS", 2 },
{ "struct", 2 },
{ "union", 2 },
{ "record", 2 },
{ "Record", 2 },
{ "RECORD", 2 },
{ "form", 1 },
{ "Form", 1 },
{ "FORM", 1 },
{ "namespace", 2 },
{ "interface" , 2 },
{ "abstract", 2 },
{ "Interface" , 2 },
{ "INTERFACE" , 2 },
{ "implementation", 2 },
{ "Implementation", 2 },
{ "IMPLEMENTATION", 2 },
{ "label", 2 },
{ "Label", 2 },
{ "LABEL", 2 },
{ "implements", 2 },
{ "extends", 2 },
{ "public", 2 },
{ "private", 2 },
{ "protected", 2 },
{ "this", 1 },
{ "This", 1 },
{ "THIS", 1 },
{ "new", 1 },
{ "New", 1 },
{ "NEW", 1 },
{ "delete", 2 },
{ "inline", 2 },
{ "operator", 1 },
{ "Inherited", 2 },
{ "Inherited", 2 },
{ "final", 2 },
{ "implements", 2 },
{ "super", 2 },
// even more...
{ "java", 2 },
{ "Java", 2 },
{ "JAVA", 2 },
{ "delphi", 2 },
{ "Delphi", 2 },
{ "SmallTalk", 2 },
{ "Smalltalk", 2 },
{ "smalltalk", 2 },
{ "assembler", 2 },
{ "Assembler", 2 },
{ "Basic", 2 },
{ "BASIC", 2 },
{ "basic", 2 },
{ "CORBA", 2 },
{ "COBOL", 2 },
{ "ADA", 2 },
{ "LISP", 2 },
// just for fun...
{ "life", 2 },
{ "sucks", 2 },
{ "rules", 2 },
{ "Quake", 2 },
{ "QuakeWorld", 2 },
{ "[ag_slammer]",2 },
{ "Aleksandras", 2 },
{ "Gluchovas" , 2 },
{ "Alex", 2 },
{ "alex", 2 },
{ "aleks", 2 },
{ "aleksas", 3 },
{ "AlexSoft", 2 },
{ "Alexsoft", 2 },
{ "SpringSky", 2 },
{ "SK_Team", 2 },
{ "soften", 2 },
{ "UB40", 2 },
{ "U96", 2 }
};
struct less_c_str
{
inline bool operator()( char* x, char* y) const
{ return ( strcmp( x,y ) < 0 );
}
};
#if defined( wxUSE_TEMPLATE_STL )
typedef map< char*, char*, less_c_str > KeywordMapT;
#else
typedef char* CharPtrT;
typedef WXSTL_MAP( CharPtrT, CharPtrT ,less_c_str) KeywordMapT;
#endif
static KeywordMapT __gMultiLangMap;
static int __gMapReady = 0;
void check_keyword_map( int keywordMapNr )
{
if ( !__gMapReady )
{
__gMapReady = 1;
// "make sure" the address of the first member of non-polimorphic class
// coinsides with the address of the instance
KeywordT dummy;
if ( (char*)& dummy != &dummy.keyWord[0] )
throw;
int size = sizeof(__gKeyWords) / sizeof( KeywordT );
for( int i = 0; i != size; ++i )
__gMultiLangMap.insert(
KeywordMapT::value_type( (char*)&__gKeyWords[i],
(char*)&__gKeyWords[i]
)
);
}
}
int get_rank( char* start, char* end )
{
// FIXME:: what if end is no longer leagal adress?
char tmp = *end;
*end = '\0'; // put temporary terminator
KeywordMapT::iterator i;
if ( (i = __gMultiLangMap.find( start ) ) != __gMultiLangMap.end() )
{
KeywordT* pKey = (KeywordT*)(*i).second;
*end = tmp;
return pKey->rank;
}
else
{
*end = tmp;
return 0;
}
}
static inline void store_range( IntListT& results, int rank, int range_len )
{
if ( !range_len ) return;
results.push_back ( ( rank << 16 ) | ( range_len ) );
}
#define STORE_RANGE store_range( results, cur_rank, cur_range_len );\
cur_rank = cur_range_len = 0;
#define NEXT_CHAR cur_range_len++; \
++cur; \
continue;
static inline int is_alpha( char ch )
{
return ( (( ch >= '_' ) && ( ch <= 'z' )) ||
(( ch >= 'A' ) && ( ch <= 'Z' ))
);
}
// _ . .
// Ziema atEjo netikEtai
static void heighlight_syntax( char* str, int strLen,
IntListT& results, bool& isComment )
{
bool isMultiline = 0;
char* cur = str;
char* end = str + strLen;
int cur_rank = ( isComment == 1 ) ? RANK_GREEN : RANK_BLACK;
int cur_range_len = 0;
while ( cur != end )
{
int has_next = ( cur+1 != end );
if ( isComment )
{
if ( *cur == '*' )
if ( has_next && *(cur+1) == '/' )
{
// turn off multiline comment mode
cur += 2;
cur_range_len += 2;
isComment = 0;
isMultiline = 0;
STORE_RANGE;
continue;
}
++cur_range_len;
++cur;
continue;
}
/*
if ( *cur == 10 )
if ( isComment )
if ( isMultiline )
{
cur_rank = RANK_GREEN;
cur_range_len = end - cur;
STORE_RANGE;
isComment = 0;
isMultiline = 0;
continue;
}*/
if ( *cur == '/' )
{
if ( has_next )
{
if ( *(cur+1) == '/' )
{
STORE_RANGE;
char* eol = cur;
while ( eol < end && *eol != 10 )
++eol;
cur_rank = RANK_GREEN;
cur_range_len = eol - cur;
cur = eol;
STORE_RANGE;
continue;
}
if ( *(cur+1) == '*' )
{
STORE_RANGE;
cur_rank = RANK_GREEN;
cur_range_len = 2;
isComment = 1;
cur += 2;
isMultiline = 1;
continue;
}
}
NEXT_CHAR;
}
if ( ( is_alpha( *cur ) || *(cur) == '#' )
&& has_next
)
{
if ( is_alpha( *(cur+1) ) )
{
char* start = cur;
cur += 2;
while ( cur != end && is_alpha(*cur) ) ++cur;
int wordRank;
if ( (wordRank = get_rank( start, cur )) > 0 )
{
STORE_RANGE;
store_range( results, wordRank, int(cur-start) );
cur_rank = cur_range_len = 0;
continue;
}
cur_range_len += ( cur-start );
continue;
}
else
NEXT_CHAR;
}
NEXT_CHAR;
}
if ( cur_range_len > 0 ) STORE_RANGE;
}
/***** Implementation for class SourcePainter ******/
SourcePainter::SourcePainter( bool assembleResultString )
: mCollectResultsOn( assembleResultString ),
mIsInComment( FALSE ),
mCommentIsMultiline( FALSE )
{
check_keyword_map(0);
}
void SourcePainter::ProcessSource( char* src, int srcLen )
{
// TBD:: multilne state...
heighlight_syntax( src, srcLen, mBlocks, mIsInComment );
if ( mCollectResultsOn )
mResultStr += string( src, srcLen );
}
void SourcePainter::SetState( bool isInComment,
bool commentIsMultiline )
{
mIsInComment = isInComment;
mCommentIsMultiline = commentIsMultiline;
}
void SourcePainter::Init(bool assembleResultString)
{
mIsInComment = 0;
mCommentIsMultiline = 0;
mCollectResultsOn = assembleResultString;
mResultStr = "";
mBlocks.erase( mBlocks.begin(), mBlocks.end() );
}
static int rank_tags_map[] =
{
TAG_BLACK_FONT,
TAG_BLUE_FONT,
TAG_RED_FONT,
TAG_GREEN_FONT
};
void SourcePainter::GetResultString(string& result, MarkupTagsT tags)
{
// this method works, only if results of processing
// are collected
ASSERT( mCollectResultsOn );
result = "";
int pos = 0;
for( size_t i = 0; i != mBlocks.size(); ++i )
{
int desc = mBlocks[i];
int len = desc & 0xFFFF;
int rank = (desc >> 16) & 0xFFFF;
result += tags[ rank_tags_map[rank] ].start;
for( int n = 0; n != len; ++n )
result += mResultStr[pos+n];
pos += len;
result += tags[ rank_tags_map[rank] ].end;
}
}
IntListT& SourcePainter::GetBlocks()
{
return mBlocks;
}
bool SourcePainter::IsKeyword( char* word, int wordLen )
{
check_keyword_map(0);
int rank = get_rank( word, word + wordLen );
return ( rank == RANK_BLUE || rank == RANK_RED );
}

View File

@@ -0,0 +1,109 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 22/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: GNU General Public License
/////////////////////////////////////////////////////////////////////////////
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/////////////////////////////////////////////////////////////////////////////
#ifndef __SOURCEPAINTER_G__
#define __SOURCEPAINTER_G__
#ifndef ASSERT
#define ASSERT(x) if (!(x)) throw
#endif
#include "wxstldefs.h"
#include "markup.h" // import MarkupTagsT definition
// "colored" codes for highlighted blocks
#define RANK_BLACK 0 // common source fragments
#define RANK_BLUE 1 // basic types
#define RANK_RED 2 // reserved words
#define RANK_GREEN 3 // comments
// colored block description format :
// int( ( rank << 16 ) | ( source_range_len ) )
inline int get_src_block_rank( int block )
{
return (block >> 16) & 0xFFFF;
}
inline int get_src_block_len( int block )
{
return block & 0xFFFF;
}
// FOR NOW:: no lagnguage-map selection
// source code syntax heighlighter (CPP+JAVA+VB+PASCAL)
class SourcePainter
{
protected:
string mResultStr;
IntListT mBlocks;
bool mCollectResultsOn;
// state variables
bool mIsInComment;
bool mCommentIsMultiline;
public:
// assembleResultString == TRUE - instructs painter
// to collect each chunk of srouce passed to ProcessSource(),
// so that results cann be futher obtained in a single string
// instead of vector of block descriptions
SourcePainter( bool assembleResultString = TRUE );
virtual ~SourcePainter() {}
// can be called multiple times (e.g. on each source line)
virtual void ProcessSource( char* src, int srcLen );
// method, for manually adjusting state of source painter
virtual void SetState( bool isInComment,
bool commentIsMultiline );
// reinitializes object - clears results of previouse processing
virtual void Init( bool assembleResultString = TRUE );
// generates string of highlighted source for the scipting
// language given by "tags" argument
virtual void GetResultString(string& result, MarkupTagsT tags);
// returns vector of block descriptors, see IntListT definition
// (block descriptors can be used for fast custom hightlighted text generation)
virtual IntListT& GetBlocks();
// NOTE:: static method
// returns if the given word is a reserved word or basic type identifier
static bool IsKeyword( char* word, int wordLen );
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,903 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 03/04/1999
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: GNU General Public License
/////////////////////////////////////////////////////////////////////////////
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/////////////////////////////////////////////////////////////////////////////
#ifndef __TDEFS_G__
#define __TDEFS_G__
// should be compiled with wxSTL-v.1.2 (or higher)
#include "wxstldefs.h"
#if defined( wxUSE_TEMPLATE_STL )
#include <vector>
#include <list>
#else
#include "wxstlvec.h"
#include "wxstllst.h"
#endif
#include "wx/window.h"
#include "wx/scrolbar.h"
#include "sourcepainter.h"
#define NPOS ((size_t)(-1))
class wxTextEditorModel;
class wxTextEditorView;
/*
* class represents column-row position in the source text,
* may refere to the column past the end-of-line,
* but should not point past the last-line in the text
*/
class TPosition
{
public:
size_t mRow;
size_t mCol;
inline TPosition() : mRow(0), mCol(0) {}
inline TPosition( size_t row, size_t col )
: mRow( row ), mCol( col ) {}
inline bool operator>( const TPosition& rhs ) const
{
if ( mRow == rhs.mRow ) return mCol > rhs.mCol;
else
return mRow > rhs.mRow;
}
inline bool operator<( const TPosition& rhs ) const
{
if ( mRow == rhs.mRow ) return mCol < rhs.mCol;
else
return mRow < rhs.mRow;
}
};
class TRange
{
public:
TPosition mFrom;
TPosition mTill;
TRange() {}
TRange( const TPosition& from, const TPosition& till )
: mFrom( from ), mTill( till )
{}
};
inline bool operator==( const TPosition& lhs, const TPosition& rhs )
{
return lhs.mRow == rhs.mRow && lhs.mCol == rhs.mCol;
}
// FOR NOW:: bigger ones...
#define MAX_BLOCK_LEN (1024*164)
#define BALANCED_BLOCK_LEN (1024*152)
#define FILLED_BLOCK_LEN (1024*148)
// FOR NOW::
#define T_ASSERT( x ) if ( !(x) ) throw;
// to speed up debug v. :
#define is_eol_char( ch ) ( ch == (char)10 )
#define is_DOS_eol_char( ch ) ( ch == (char)13 )
// the target-platfrom eol-marking is selected when
// new text document is created or auto-detection
// failed to determine the text-format (e.g. no EOLs found at all)
#if defined(__WINDOWS__) || defined(__WXMSW__)
#define IS_UNIX_TEXT_BY_DEFAULT FALSE
#else
#define IS_UNIX_TEXT_BY_DEFAULT TRUE
#endif
//inline bool is_eol_char( char ch ) { return ch == 10 && ch == 13 ; }
/*
* Class contains single fragment of the source text, which
* may grow or shrink in the process of editing. Blocks always
* start at the begining of the line and end at eol, i.e. lines
* are not broken among blocks
*/
class TBlock
{
public:
char mBuf[MAX_BLOCK_LEN];
size_t mTextLen;
size_t mRowCount;
TBlock() : mTextLen(0), mRowCount(0) { mBuf[0] = '\0'; }
void RecalcBlockProperties();
bool operator==( const TBlock& blk ) const { return this == &blk; }
bool operator!=( const TBlock& blk ) const { return this != &blk; }
bool operator<( const TBlock& blk ) const { return TRUE; }
bool operator>( const TBlock& blk ) const { return FALSE; }
};
/*
* captures info about mutable command
*/
class TCommand
{
public:
TCommand() : mType(-1) {}
TCommand( int type ) : mType( type ) {}
~TCommand() {}
int mType;
char* mData;
size_t mDataLen;
TRange mRange;
// positions of cursor before and after executions of this command
TPosition mPrePos;
TPosition mPostPos;
};
enum TEXT_EDITOR_COMMAND
{
TCMD_INSERT,
TCMD_DELETE
};
enum TEXT_CHANGE_TYPE
{
CT_MODIFIED,
CT_DELETED,
CT_INSERTED
};
class wxTextEditorView;
// STL-list is used for managing blocks, since it's alg. collects
// removed elements into a free-list, from which they
// can be reclaimed later, that way heap-fragmentation may be reduced
#if defined( wxUSE_TEMPLATE_STL )
typedef list<TBlock> TBlockListT;
typedef vector<TCommand*> TCommandListT;
typedef vector<wxTextEditorView*> TextViewListT;
#else
typedef WXSTL_LIST( TBlock ) TBlockListT;
typedef TCommand* TCommandPtrT;
typedef WXSTL_VECTOR_SHALLOW_COPY( TCommandPtrT ) TCommandListT;
typedef wxTextEditorView* TextViewPtrT;
typedef WXSTL_VECTOR_SHALLOW_COPY( TextViewPtrT ) TextViewListT;
#endif
typedef TBlockListT::iterator TBlockIteratorT;
/*
* class shields the higher-level operations from direct access
* to blocks of fragmented in-memory buffers
*/
class TTextIterator
{
public:
TBlockIteratorT mBlockIter;
TBlockIteratorT mEndOfListIter;
TPosition mPos;
size_t mActualRow;
size_t mFirstRowInBlock;
char* mpCurRowStart;
bool mIsEof;
public:
TTextIterator();
char GetChar();
bool IsEol();
bool IsEof();
bool IsLastLine();
int GetDistFromEol();
void NextChar();
void PreviousChar();
void NextWord();
void PreviousWord();
void ToEndOfLine();
void ToStartOfLine();
bool IsInLastBlock();
// accesors
size_t GetLineLen();
TPosition GetPosition();
char* GetClosestPos();
char* GotoClosestPos();
inline char* GetBlockStart() { return (*mBlockIter).mBuf; }
inline char* GetBlockEnd() { return (*mBlockIter).mBuf + (*mBlockIter).mTextLen; }
bool DetectUnixText();
// adjust this member to add specific separators,
// the default value is : ",.()[]\t\\+-*/|=<>:;\t\n~?!%"
static string mSeparators;
static bool IsSeparator( char ch );
};
class wxTextEditorModel;
class TTextChangeListenerBase
{
public:
virtual void OnTextChanged( wxTextEditorModel* pModel, size_t atRow, size_t nRows, TEXT_CHANGE_TYPE ct ) = 0;
};
class TCppJavaHighlightListener : public TTextChangeListenerBase
{
protected:
wxTextEditorModel* mpModel; // is set up temporarely
enum { IN_COMMENT_STATE, OUT_OF_COMMENT_STATE };
public:
virtual void OnTextChanged( wxTextEditorModel* pModel, size_t atRow, size_t nRows, TEXT_CHANGE_TYPE ct );
};
/*
* Base class for user-defined "bookmarks" within the source-text, bookmarks
* are automatically repositioned or deleted as the text is edited. Class
* can be subclassed to add pin-specific data (e.g. breakpoint information)
*/
class TPinBase
{
public:
int mTypeCode;
size_t mRow;
public:
TPinBase()
: mTypeCode(-1), mRow(NPOS) {}
TPinBase( int typeCode, size_t row )
: mTypeCode( typeCode ), mRow( row ) {}
size_t GetRow() { return mRow; }
int GetTypeCode() { return mTypeCode; }
virtual ~TPinBase() {}
};
// "recommened" type-code ranges for custom pins
#define HIHGLIGHTING_PINS_TC_STARRT 50
#define OTHER_PINS_TC_START 100
inline bool operator<( const TPinBase& lhs, TPinBase& rhs )
{ return lhs.mRow < rhs.mRow; }
#if defined( wxUSE_TEMPLATE_STL )
typedef vector<TPinBase*> PinListT;
typedef vector<TTextChangeListenerBase*> ChangeListenerListT;
#else
typedef TPinBase* TPinBasePtrT;
typedef WXSTL_VECTOR_SHALLOW_COPY( TPinBasePtrT ) PinListT;
typedef TTextChangeListenerBase* TTextChangeListenerBasePtrT;
typedef WXSTL_VECTOR_SHALLOW_COPY( TTextChangeListenerBasePtrT ) ChangeListenerListT;
#endif
/* OLD STUFF::
struct TPinBaseCompareFunctor
{
inline int operator()(const TPinBasePtrT* x, const TPinBasePtrT*& y ) const
{
return x->mLine < y->mLine;
}
};
typedef WXSTL_MULTIMAP( TPinBasePtrT, TPinBasePtrT, TPinBaseCompareFunctor ) PinMapT;
typedef PinMapT::iterator PinIteratorT;
*/
/*
* Class manages access and manpulation of in-memory text. Can
* be accessed by multiple views, only one of which can be active
* at a time.
*/
class wxTextEditorModel
{
protected:
TBlockListT mBlocks;
TCommandListT mCommands;
size_t mCurCommand;
TextViewListT mViews;
wxTextEditorView* mpActiveView;
PinListT mPins;
bool mIsUnixText;
ChangeListenerListT mChangeListeners;
public:
/*** public properties ***/
bool mTextChanged;
size_t mChangedFromRow;
size_t mChangedTillRow;
bool mWasChanged; // TRUE, if any content has been changed
TPosition mCursorPos;
TPosition mPrevSelectionStart;
TPosition mPrevSelectionEnd;
TPosition mPrevCursorPos;
TPosition mSelectionStart;
TPosition mSelectionEnd;
size_t mRowsPerPage;
bool mIsReadOnly; // default: FALSE
bool mIsModified;
bool mInsertMode; // default: TRUE
bool mAutoIndentMode; // default: TRUE
bool mSmartIndentMode; // default: TRUE
bool mIsSelectionEditMode; // default: TRUE
size_t mTabSize; // default: 4
StrListT mSearchExprList;
string mLastFindExpr;
bool mCheckPointDestroyed;
size_t mCheckPointCmdNo;
protected:
size_t GetLineCountInRange( char* from, char* till );
// two lowest-level operations
void DoInsertText ( const TPosition& pos, char* text, size_t len, TRange& actualRange );
void DoDeleteRange( const TPosition& from, const TPosition& till, TRange& actualRange );
void DoExecuteNewCommand( TCommand& cmd );
void DoReexecuteCommand( TCommand& cmd );
void DoUnexecuteCommand( TCommand& cmd );
void ExecuteCommand( TCommand* pCmd );
// to methods enabling grouping of undo-able commands
bool CanPrependCommand( TCommand* pCmd );
void PrependCommand( TCommand* pCmd );
void SetPostPos( const TPosition& pos );
void UndoImpl();
void RedoImpl();
void StartBatch();
void FinishBatch();
void CheckSelection();
void TrackSelection();
void NotifyView();
void NotifyAllViews();
void NotifyTextChanged( size_t atRow, size_t nRows, TEXT_CHANGE_TYPE ct );
void NotifyTextChanged( TPosition from, TPosition till, TEXT_CHANGE_TYPE ct );
void ArrangePositions( TPosition& upper, TPosition& lower );
void ArrangePositions( size_t& upper, size_t& lower );
void MergeChange( size_t fromRow, size_t nRows );
void PrepreForCommand();
size_t TextToScrColumn( const TPosition& pos );
size_t ScrToTextColumn( TPosition pos );
void DoMoveCursor( int rows, int cols );
public:
wxTextEditorModel();
virtual ~wxTextEditorModel();
// utilities
char* AllocCharacters( size_t n );
char* AllocCharacters( size_t n, const char* srcBuf );
void FreeCharacters( char* buf );
void DeleteSelection();
TTextIterator CreateIterator( const TPosition& pos );
void DeleteRange( const TPosition& from, const TPosition& till );
void InsertText( const TPosition& pos, const char* text, size_t len );
void GetTextFromRange( const TPosition& from, const TPosition& till, char** text, size_t& textLen );
void LoadTextFromFile( const wxString& fname );
void SaveTextToFile( const wxString& fname );
void ResetSelection();
void ClearUndoBuffer();
void DeleteAllText();
void GetAllText( char** text, size_t& textLen );
void SetSelectionEditMode( bool editIsOn );
/*** user-level commands ***/
// mutable (undoable) commands
void OnInsertChar( char ch );
void OnDelete();
void OnDeleteBack();
void OnDeleteLine();
void OnShiftSelectionIndent( bool left );
// clipboard functions
void OnCopy();
void OnPaste();
void OnCut();
bool CanCopy();
bool CanPaste();
// undo-redo
bool CanUndo();
bool CanRedo();
void OnUndo();
void OnRedo();
// imutable commands
void OnMoveLeft();
void OnMoveRight();
void OnMoveUp();
void OnMoveDown();
void OnWordLeft();
void OnWordRight();
void OnMoveToPosition( const TPosition& pos );
void OnEndOfLine();
void OnStartOfLine();
void OnPageUp();
void OnPageDown();
void OnSlideUp();
void OnSlideDown();
void OnStartOfText();
void OnEndOfText();
void OnSelectWord();
void OnSelectAll();
// bookmarks
void OnToggleBookmark();
void OnNextBookmark();
void OnPreviousBookmark();
// search
bool OnFind();
bool OnFindNext();
bool OnFindPrevious();
void OnGotoLine( int line, int col );
void OnGotoLine();
// status
bool IsReadOnly();
bool IsModified();
bool IsInsertMode();
// check-pointin
void SetCheckpoint();
bool CheckpointModified();
// accessors
TPosition GetStartOfSelection();
TPosition GetEndOfSelection();
TPosition GetCursor();
size_t GetTotalRowCount();
bool SelectionIsEmpty();
bool IsLastLine( const TPosition& pos );
bool IsUnixText() { return mIsUnixText; }
void GetSelection( char** text, size_t& textLen );
void SetStartOfSelection( const TPosition& pos );
void SetEndOfSelection( const TPosition& pos );
void SetCursor( const TPosition& pos );
void AddView( wxTextEditorView* pView );
void RemoveView( wxTextEditorView* pView );
void SetActiveView( wxTextEditorView* pView );
wxTextEditorView* GetActiveView();
void SetRowsPerPage( size_t n );
void AddPin( TPinBase* pPin );
PinListT& GetPins();
// returns NPOS, if non
size_t FindFirstPinInRange( size_t fromRow, size_t tillRow );
size_t FindNextPinFrom( size_t fromRow );
size_t FindPreviousPinFrom( size_t fromRow );
size_t GetPinNoAt( size_t row, int pinTypeCode );
TPinBase* GetPinAt( size_t row, int pinTypeCode );
void RemovePinAt( size_t row, int pinTypeCode );
void AddChangeListener( TTextChangeListenerBase* pListener );
};
class TCursorTimer;
class wxTextEditorView;
class TPinPainterBase : public wxObject
{
public:
int mPinTypeCode;
public:
TPinPainterBase( int pinTc ) : mPinTypeCode( pinTc ) {}
TPinPainterBase() : mPinTypeCode( -1 ) {}
inline int GetPinTypeCode() { return mPinTypeCode; }
virtual void DrawPin( TPinBase* pPin, wxTextEditorView& view, wxDC& dc,
const wxPoint& pos, const wxSize& dim ) = 0;
};
/*
* a couple very common ping objects/painters
*/
#define BOOKMARK_PIN_TC (OTHER_PINS_TC_START)
#define BRKPOINT_PIN_TC (BOOKMARK_PIN_TC + 1)
class TBookmarkPainter : public TPinPainterBase
{
protected:
wxBrush mBkBrush;
public:
TBookmarkPainter();
virtual void DrawPin( TPinBase* pPin, wxTextEditorView& view, wxDC& dc,
const wxPoint& pos, const wxSize& dim );
};
class TBookmarkPin : public TPinBase
{
public:
TBookmarkPin( size_t row )
: TPinBase( BOOKMARK_PIN_TC, row )
{}
static int GetPinTypeCode() { return BOOKMARK_PIN_TC; }
};
class TBreakpointPainter : public TPinPainterBase
{
protected:
wxBrush mBkBrush;
public:
TBreakpointPainter();
virtual void DrawPin( TPinBase* pPin, wxTextEditorView& view, wxDC& dc,
const wxPoint& pos, const wxSize& dim );
};
class TBreakpointPin : public TPinBase
{
public:
TBreakpointPin( size_t row )
: TPinBase( BRKPOINT_PIN_TC, row )
{}
static int GetPinTypeCode() { return BRKPOINT_PIN_TC; }
};
#if defined( wxUSE_TEMPLATE_STL )
typedef vector<TPinPainterBase*> PinPainterListT;
#else
typedef TPinPainterBase* TPinPainterBasePtrT;
typedef WXSTL_VECTOR_SHALLOW_COPY( TPinPainterBasePtrT ) PinPainterListT;
#endif
/*
* Class displays graphical view of data contained in wxTextModel
*/
class wxTextEditorView : public wxScrolledWindow
{
protected:
wxTextEditorModel* mpModel;
TPosition mSelectionStart;
TPosition mSelectionEnd;
TPosition mCursorPos;
TPosition mLastViewStart;
size_t mLastRowsTotal;
size_t mRowsPerPage;
size_t mColsPerPage;
static char* mpLineBuffer;
static size_t mpLineBufferLen;
bool mFullRefreshPending;
bool mAdjustScrollPending;
wxFont mFont;
bool mScrollingOn; // default: TRUE
bool mCursorOn; // default: TRUE;
bool mLTMode; // line-tracking mode
// (when the whole line is coloured,
// instead of showing blinking cursor position)
wxColour mLTColour; // fill-colour for LT-mode
bool mDragStarted;
char* mpDraggedText;
bool mOwnsModel;
wxString mFragment; // reused heap-buffer
// for coloured fragments
SourcePainter* mpPainter;
PinPainterListT mPinPainters;
TTextIterator mCashedIter;
static TCursorTimer* mpTimer;
public: /*** public properties ***/
int mLeftMargin; // default: 20
int mRightMargin; // default: 0
int mTopMargin; // default: 0
int mBottomMargin; // default: 0
int mMaxColumns; // default: 500
TPosition mPagePos;
// color-scheme properties
wxColour mNormalTextCol;
wxColour mIndentifierTextCol;
wxColour mReservedWordTextCol;
wxColour mCommentTextCol;
wxColour mNormalBkCol;
wxColour mSelectionFgCol;
wxColour mSelectionBkCol;
wxBrush mNormalBkBrush;
wxBrush mSelectedBkBrush;
// accessed by timer
TPosition mCursorScrPos;
wxSize mCharDim;
protected:
char* GetLineBuffer( size_t len );
virtual void PaintDecorations( size_t fromRow, size_t tillRow, wxDC& dc, TTextIterator& iter );
virtual void PaintRows( size_t fromRow, size_t tillRow, wxDC& dc );
void ObtainFontProperties();
bool IsActiveView();
void SetTextDefaults();
void RecalcPagingInfo();
TPinPainterBase* FindPainterForPin( TPinBase& pin );
public:
wxTextEditorView( wxWindow* parent, wxWindowID id = -1,
wxTextEditorModel* pModel = NULL,
int wndStyle = wxSUNKEN_BORDER,
bool ownsModel = TRUE );
~wxTextEditorView();
/*** setup methods ***/
void SetModel( wxTextEditorModel* pModel );
// sets custom syntax-higlighting implementation
void SetSourcePainter( SourcePainter* pPainter );
void AddPinPainter( TPinPainterBase* pPainter );
void SetDefaultFont( const wxFont& font );
wxFont& GetDefaultFont();
wxSize GetCharacterSize() { return mCharDim; }
size_t GetRowsPerPage() { return mRowsPerPage; }
void SetRowsPerPage( size_t n );
void SetMaxColumns( size_t n );
void SetLineTrackingMode( bool on, const wxColour& col = wxColour(255,255,0) );
void EnableCursor( bool enable );
void EnableScrollbars( bool enable );
void SetColours( const wxColour& normalBkCol,
const wxColour& selectedBkCol,
const wxColour& selectedTextCol );
void SetHeighlightingColours( const wxColour& normalTextCol,
const wxColour& identifierTextCol,
const wxColour& reservedWordTextCol,
const wxColour& commentTextCol );
void SetMargins( int top, int left, int bottom, int right );
// notifications from editor-model:
void OnModelChanged();
void ScrollView( int rows, int cols );
// accessors
void Activate();
void Deactivate();
// event handlers
#if (( wxVERSION_NUMBER < 2100 ) || (( wxVERSION_NUMBER == 2100 ) && (wxBETA_NUMBER <= 4)))
void OnScroll( wxScrollEvent& event );
#else
void OnScroll( wxScrollWinEvent& event );
#endif
void OnPaint ( wxPaintEvent& event );
void OnSize ( wxSizeEvent& event );
void OnEraseBackground( wxEraseEvent& event );
void OnLButtonDown( wxMouseEvent& event );
void OnLButtonUp ( wxMouseEvent& event );
void OnMotion ( wxMouseEvent& event );
void OnDblClick ( wxMouseEvent& event );
void OnSetFocus( wxFocusEvent& event );
void OnKillFocus( wxFocusEvent& event );
// requests editor to keep cursor blinking, even when
// the window has lost it's focus
void HoldCursor( bool hold );
// FOR NOW:: hard-coded key-bindings
void OnChar( wxKeyEvent& event );
void OnKeyDown( wxKeyEvent& event );
// utilities
virtual void SyncViewPortPosition();
virtual void SyncScrollbars();
virtual void PositionCursor();
void TextPosToScreenPos( const TPosition& txtPos, TPosition& scrPos );
void ScreenPosToTextPos( const TPosition& scrPos, TPosition& txtPos );
void ScreenPosToPixels ( const TPosition& scrPos, int& x, int& y );
void PixelsToScrPos ( int x, int y, int& scrRow, int& scrCol );
void PixelsToTextPos ( int x, int y, TPosition& textPos );
bool IsClipboardCmd( wxKeyEvent& key );
TPosition GetPagePos() { return mPagePos; }
DECLARE_EVENT_TABLE()
};
// TODO:: mutex class should be used to avoid race on updates
class TCursorTimer : public wxTimer
{
protected:
wxTextEditorView* mpView;
volatile bool mIsLocked;
volatile bool mIsShown;
volatile bool mStarted;
wxBrush mBrush;
bool mMissOneTick;
int mBlinkInterval; // default: 500mills
protected:
void DrawCursor();
public:
TCursorTimer();
virtual void Notify();
void SetView( wxTextEditorView* pView );
wxTextEditorView* GetView();
void HideCursor( bool forceHide = FALSE );
void ShowCursor( bool forceShow = FALSE );
void SetIsShown( bool isShown );
void Lock();
void Unlock();
};
#endif // __TDEFS_G__

View File

@@ -0,0 +1,118 @@
from wxPython.wx import *
from wxPython.lseditor import *
class LSEditorFrame(wxFrame):
def __init__(self, parent, id, title, pos = wxDefaultPosition, size = wxSize(400,400)):
wxFrame.__init__(self, parent, id, title, pos, size)
self.editor = wxsLSEditorPlugin()
self.editor.Create(self, -1)
self.SetMenuBar(self.GetDefaultMenuBar())
self.CreateStatusBar()
self.SetDefaultEvents()
self.filename = ""
def GetDefaultMenuBar(self):
mbar = wxMenuBar()
menu = wxMenu()
menu.Append(1500, "Open")
menu.Append(1501, "Save")
menu.Append(1502, "SaveAs")
menu.AppendSeparator()
menu.Append(1503, "Exit")
mbar.Append(menu, "File")
menu = wxMenu()
menu.Append(1510, "Copy")
menu.Append(1511, "Cut")
menu.Append(1512, "Paste")
menu.AppendSeparator()
menu.Append(1513, "Delete")
menu.AppendSeparator()
menu.Append(1514, "Undo")
menu.Append(1515, "Redo")
menu.AppendSeparator()
menu.Append(1516, "Find...")
menu.Append(1517, "Find Next")
menu.Append(1518, "Find Previous")
menu.Append(1519, "Replace...")
mbar.Append(menu, "Edit")
menu = wxMenu()
menu.Append(1520, "Toggle")
menu.Append(1521, "Next")
menu.Append(1522, "Prev")
mbar.Append(menu, "Bookmarks")
return mbar
def SetDefaultEvents(self):
EVT_MENU(self, 1500, self.evt_OnOpen)
EVT_MENU(self, 1501, self.evt_OnSave)
EVT_MENU(self, 1502, self.evt_OnSaveAs)
EVT_MENU(self, 1503, self.OnClose)
EVT_MENU(self, 1510, self.evt_OnCopy)
EVT_MENU(self, 1511, self.evt_OnCut)
EVT_MENU(self, 1512, self.evt_OnPaste)
EVT_MENU(self, 1513, self.evt_OnDelete)
EVT_MENU(self, 1514, self.evt_OnUndo)
EVT_MENU(self, 1515, self.evt_OnRedo)
EVT_MENU(self, 1516, self.evt_OnFind)
EVT_MENU(self, 1517, self.evt_OnFindNext)
EVT_MENU(self, 1518, self.evt_OnFindPrevious)
EVT_MENU(self, 1519, self.evt_OnReplace)
EVT_MENU(self, 1520, self.evt_OnToggle)
EVT_MENU(self, 1521, self.evt_OnNext)
EVT_MENU(self, 1522, self.evt_OnPrev)
#EVT_MENU(self, 15, self.evt_)
#EVT_MENU(self, 15, self.evt_)
def evt_OnOpen(self, event):
dlg = wxFileDialog(NULL, "Open file")
if dlg.ShowModal() == wxID_OK:
self.filename = dlg.GetPath()
self.editor.OnOpen(self.filename)
def evt_OnSaveAs(self, event):
dlg = wxFileDialog(NULL, "Save As", self.filename)
if dlg.ShowModal() == wxID_OK:
self.filename = dlg.GetPath()
self.editor.OnSave(self.filename)
def evt_OnSave(self, event):
if self.filename:
self.editor.OnSave(self.filename)
else:
self.evt_OnSaveAs(None)
def OnClose(self,event):
self.Destroy()
def evt_OnCopy(self,event):
self.editor.OnCopy()
def evt_OnCut(self,event):
self.editor.OnCut()
def evt_OnPaste(self,event):
self.editor.OnPaste()
def evt_OnDelete(self,event):
self.editor.OnDelete()
def evt_OnUndo(self,event):
self.editor.OnUndo()
def evt_OnRedo(self,event):
self.editor.OnRedo()
def evt_OnToggle(self,event):
self.editor.OnToggleBookmark()
def evt_OnNext(self,event):
self.editor.OnNextBookmark()
def evt_OnPrev(self,event):
self.editor.OnPreviousBookmark()
def evt_OnFind(self,event):
self.editor.OnFind()
def evt_OnFind(self,event):
self.editor.OnFind()
def evt_OnFindNext(self,event):
self.editor.OnFindNext()
def evt_OnFindPrevious(self,event):
self.editor.OnFindPrevious()
self.SetStatusText("OnFindPrevious: Not implemented")
def evt_OnReplace(self,event):
self.editor.OnReplace()
self.SetStatusText("OnReplace: Not implemented")
class MyApp(wxApp):
def OnInit(self):
frame = LSEditorFrame(NULL, -1, "Editor")
frame.Show(TRUE)
return TRUE
App = MyApp(0)
App.MainLoop()

View File

@@ -0,0 +1,374 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 24/04/1999
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: GNU General Public License
/////////////////////////////////////////////////////////////////////////////
#ifndef __WXSDEFS_G__
#define __WXSDEFS_G__
#include <config.h>
#include "controlarea.h"
#ifdef wxUSE_TEMPLATE_STL
#include <vector>
#include <map>
//using std::map;
//using std::vector;
using namespace std;
#else
#include "wxstldefs.h" // imports predefine StrListT, IntListT containers
#include "wxstlac.h"
#endif
class wxsProject;
class wxsComponent;
class wxsWorkplace;
class wxsOpenedFileInfo;
class wxsWorkplaceListener;
class wxsSourceEditorPlugin;
class wxsSourceInfoPlugin;
class wxsAppListener;
class wxsAppInterface;
class wxFrame;
typedef wxsWorkplaceListener* wxsWorkplaceListenerPtrT;
#ifdef wxUSE_TEMPLATE_STL
typedef vector<wxsWorkplaceListenerPtrT> wxsWorkplaceListenerListT;
#else
typedef WXSTL_VECTOR_SHALLOW_COPY( wxsWorkplaceListenerPtrT ) wxsWorkplaceListenerListT;
#endif
// IDs for the controls and the menu commands
enum
{
// menu items
WXS_Quit = 3300, // FIXEM:: ids..
WXS_About,
WXS_Open,
WXS_Close,
WXS_OpenWorkplace,
WXS_Save,
WXS_SaveAs,
WXS_SaveAll,
WXS_CloseWorkplace,
WXS_SaveWorkplace,
WXS_NewProject,
WXS_ShowTips,
WXS_Undo = 9000,
WXS_NextWindow,
WXS_PreviousWindow,
WXS_CloseWindow,
WXS_ListWindows,
WXS_UpdateBrowser,
WXS_ToggleWorkplaceWindow,
WXS_InsertFiles,
WXS_Test,
WXS_Settings,
WXS_ClassView,
WXS_FileView,
WXS_GotoEditor,
WXS_Test1,
WXS_Test2,
// controls start here (the numbers are, of course, arbitrary)
WXS_Text = 1000,
ID_EDIT_UNDO,
ID_EDIT_REDO,
ID_EDIT_CUT,
ID_EDIT_COPY,
ID_EDIT_PASTE,
ID_EDIT_DELETE,
ID_EDIT_SELECT_ALL,
ID_EDIT_FIND,
ID_EDIT_FIND_NEXT,
ID_EDIT_REPLACE,
ID_EDIT_GOTO,
ID_EDIT_TOGGLE_BM,
ID_EDIT_NEXT_BM,
ID_EDIT_PREV_BM,
ID_EDIT_TOGGLE_BRKPNT,
ID_EDIT_BOOKMARKS,
ID_EDIT_SETFONT,
ID_LEFT_SASH,
ID_BOTTOM_SASH
};
// bitmaps/icons
enum WXS_ICON_ENUM{
WXS_ICON_class = 1,
WXS_ICON_priv_mtd,
WXS_ICON_prot_mtd,
WXS_ICON_pub_mtd,
WXS_ICON_priv_mtd_def,
WXS_ICON_prot_mtd_def,
WXS_ICON_pub_mtd_def,
WXS_ICON_priv_var,
WXS_ICON_prot_var,
WXS_ICON_pub_var,
WXS_ICON_pub_pure_mtd,
WXS_ICON_file,
WXS_ICON_folder,
WXS_ICON_mru_folder,
WXS_ICON_class_gray,
WXS_ICON_file_gray,
};
typedef char* CharPtrT;
struct UU_cmp
{
inline int operator()(const CharPtrT x, const CharPtrT y ) const { return 0; }
};
typedef wxBitmap* wxBitmapPtrT;
#ifdef wxUSE_TEMPLATE_STL
typedef map<WXS_ICON_ENUM, wxBitmapPtrT> WXS_BitmapsMapT;
#else
typedef WXSTL_MAP( WXS_ICON_ENUM, wxBitmapPtrT,
LESS_THEN_FUNCTOR(WXS_ICON_ENUM) ) WXS_BitmapsMapT;
#endif
extern WXS_BitmapsMapT WXS_Bitmaps;
#define WXS_ICON(name) (*WXS_Bitmaps[WXS_ICON_##name])
// very general file categories
enum WXS_FILE_CATEGORY
{
WXS_UNKNOWN_FILE,
WXS_SOURCE_FILE,
WXS_RESOURCE_FILE,
WXS_DOCUMENTATION_FILE,
WXS_CONFIGURAITON_FILE
};
enum WXS_PLUGIN_TYPE
{
WXS_UNKNOWN_PLUGIN,
WXS_EDITOR_PLUGIN,
WXS_CLASSINFO_PLUGIN,
WXS_CLASSBROWSER_PLUGIN,
WXS_FILEBROWSER_PLUGIN,
WXS_TOOL_PLUGIN,
WXS_OUTPUTTOOL_PLUGIN
};
class wxsAppListener
{
public:
virtual void OnWindowSwitched( wxWindow* fromWnd, wxWindow* toWnd ) {};
virtual bool OnCloseWindow( wxWindow* wnd ) { return TRUE; }
virtual void OnTabSwitched() {};
virtual void OnPageSwitched() {};
};
class wxsAppInterface
{
public:
virtual void SetAppListener(wxsAppListener* pLsn) = 0;
virtual void AddEditor(wxsSourceEditorPlugin* editor,wxString title,wxBitmap* pImage = NULL) = 0;
virtual void ActivateEditor( wxsSourceEditorPlugin* editor ) = 0;
virtual void CloseEditor( wxsSourceEditorPlugin* editor ) = 0;
virtual void ShowNextWindow() = 0;
virtual void ShowPreviousWindow() = 0;
virtual void CloseActiveWindow() = 0;
virtual void CloseWindow( wxWindow* wnd ) = 0;
virtual void ShowWindowList() = 0;
virtual wxWindow* GetActiveWindow() = 0;
virtual wxTabbedWindow* GetTabbedWindow() = 0;
virtual void AddTab(wxsComponent* pContent, wxString tabText, wxBitmap* pImage = NULL) = 0;
virtual void ShowNextTab() = 0;
virtual wxPaggedWindow* GetPaggedWindow() = 0;
virtual void AddPage(wxsComponent* pContent, wxString tabText, wxBitmap* pImage = NULL) = 0;
virtual void ShowNextPage() = 0;
virtual wxFrame* GetMainFrame() = 0;
virtual void SetStatusText( const string& text ) = 0;
static wxsAppInterface& GetInstance();
protected:
static wxsAppInterface* mpInstance;
friend wxsAppInterface& wxsGetApp();
};
// short-cut for wxsAppInterface::GetInstance()
wxsAppInterface& wxsGetApp();
class wxsWorkplaceListener : public wxObject
{
public:
virtual void OnSubprojectAdded( wxsProject& subPrj, wxsProject& toPrj ) {}
virtual void OnSubprojectRemoved( wxsProject& subPrj, wxsProject& fromPrj ) {}
virtual void OnProjectCreated( wxsProject& prj ) {}
virtual void OnRootProjectLoaded() {}
virtual void OnRootProjectClosed() {}
virtual void OnFilesAddedToProject( wxsProject& prj, StrListT& files, WXS_FILE_CATEGORY cat ) {}
virtual void OnFilesRemovedFromProject( wxsProject& prj, StrListT& files, WXS_FILE_CATEGORY cat ) {}
virtual void OnFileContentChanged( wxsProject& prj, const string& file, WXS_FILE_CATEGORY cat,
char* newContent, size_t len ) {}
virtual void OnFileOpened( wxsOpenedFileInfo& file ) {}
};
typedef wxsProject* wxsProjectPtrT;
#ifdef wxUSE_TEMPLATE_STL
typedef vector<wxsProjectPtrT> wxsProjectListT;
#else
typedef WXSTL_VECTOR_SHALLOW_COPY( wxsProjectPtrT ) wxsProjectListT;
#endif
class wxsProject : public wxObject
{
public:
// Basic project info
virtual void SetName(const string& name) = 0;
virtual void SetFileName(const string& fname) = 0;
virtual void SetDescription(const string& desc) = 0;
virtual void SetLanguage(const string& lang) = 0;
virtual string GetName() = 0;
virtual string GetFileName() = 0;
virtual string GetDescription() = 0;
virtual string GetLanguage() = 0;
// File manipulation
virtual bool AddFile( const string& file) = 0;
virtual bool RemoveFile ( const string& file ) = 0;
virtual StrListT GetFiles() = 0;
// Sub-Project manipulation
virtual void AddSubproject( wxsProject* subPrj) = 0;
virtual void RemoveSubproject( wxsProject* subPrj) = 0;
virtual wxsProjectListT& GetSubprojects() = 0;
// Transient information (parent only exists when loaded
virtual void SetParent( wxsProject* parentPrj) = 0;
virtual wxsProject* GetParent() = 0;
// configuration info storage
virtual string CreateConfig ( const string& file = "" ) = 0;
virtual bool SetCurrentConfig ( const string& configkey ) = 0;
virtual bool AddConfigValue( const string& key, string& value) = 0;
virtual bool SetConfigValue( const string& key, string& value) = 0;
virtual bool RemoveConfigValue( const string& key ) = 0;
virtual string GetConfigValue ( const string& key ) = 0;
};
class wxsOpenedFileInfo : public wxObject
{
public:
string mFullName;
wxsProject* mpProject; // NULL, if file does not belong to any project
wxsSourceEditorPlugin* mpEditor;
WXS_FILE_CATEGORY mCategory;
bool mIsSaved;
public:
wxsOpenedFileInfo() : mIsSaved( TRUE ), mpProject( NULL ) {}
wxsProject* GetProject() { return mpProject; }
const string& GetFullName() { return mFullName; }
wxsSourceEditorPlugin& GetEditor() { return *mpEditor; }
WXS_FILE_CATEGORY GetCategory() { return mCategory; }
};
typedef wxsOpenedFileInfo* wxsOpenedFileInfoPtrT;
#ifdef wxUSE_TEMPLATE_STL
typedef vector<wxsOpenedFileInfoPtrT> wxsOpenedFileInfoListT;
#else
typedef WXSTL_VECTOR_SHALLOW_COPY( wxsOpenedFileInfoPtrT ) wxsOpenedFileInfoListT;
#endif
// abstract interface
class wxsWorkplace : public wxObject
{
public:
virtual void CreateProject( const string& name, const string& projectFile, const wxsProject* parent=NULL) = 0;
virtual void LoadRootProject( const string& projectFile ) = 0;
virtual void SaveProject( wxsProject& prj ) = 0;
virtual void CloseRootProject() = 0;
virtual wxsProject& GetRootProject() = 0;
virtual wxsProject* FindProjectByName( const string& name ) = 0;
virtual wxsOpenedFileInfo* FindFileByEditor( wxsSourceEditorPlugin& editor ) = 0;
virtual void AddWorkpalceListener( wxsWorkplaceListener* pListener ) = 0;
virtual void AddSubproject( wxsProject& intoPrj,const string& projectFile ) = 0;
virtual void RemoveSubproject( wxsProject& prj ) = 0;
virtual void AddFilesToProject( wxsProject& prj, StrListT& files ) = 0;
virtual void RemoveFilesFromProject( wxsProject& prj, StrListT& files ) = 0;
virtual void NotifyFileContentChanged( wxsProject& prj, const string& file,
char* newContent, size_t len ) = 0;
virtual void NotifyFileContentChanged( wxsOpenedFileInfo& info ) = 0;
virtual void NotifyEditorDeactivated( wxsSourceEditorPlugin& editor ) = 0;
// if pPrj is NULL, the specified file does not belong to any projects,
// i.e. it blongs to the workplace
virtual wxsOpenedFileInfo*
OpenFileInEditor( const string& file, wxsProject* pPrj = NULL,
int line = -1, int column = -1) = 0;
virtual void GetCurrentFileContent( wxsProject& prj, const string& file,
char** buf, size_t& len
) = 0;
// returns FALSE, if source was already up-to-date
virtual bool SyncSourceInfo() = 0;
virtual wxsProject* FindSubproject( wxsProject& parentPrj, const string& prjName ) = 0;
virtual wxsOpenedFileInfo* FindOpenedFile( const string& name ) = 0;
virtual bool FileIsOpened( wxsProject& prj, const string& file ) = 0;
virtual wxsSourceEditorPlugin* GetSourceEditor( wxsProject& prj, const string& file ) = 0;
virtual wxsSourceInfoPlugin* GetSourceInfoPlugin() = 0;
static wxsWorkplace& GetInstance() { return *wxsWorkplace::mpInstance; }
virtual wxsOpenedFileInfoListT& GetOpenedFiles() = 0;
virtual wxsOpenedFileInfo* GetActiveFile() = 0;
virtual void SaveFile( wxsOpenedFileInfo& info ) = 0;
virtual void SaveAllFiles() = 0;
virtual bool CloseFile( wxsOpenedFileInfo& info, bool closeWindow = TRUE ) = 0;
virtual bool CloseAllFiles() = 0;
virtual bool CloseInProgress() = 0;
virtual WXS_FILE_CATEGORY GetFileCategory( const string& file ) = 0;
protected:
static wxsWorkplace* mpInstance;
friend wxsWorkplace& wxsGetWorkplace();
};
// short-cut for wxsWorkplace::GetInstance()
wxsWorkplace& wxsGetWorkplace();
#endif

View File

@@ -0,0 +1,659 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 27/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WXSTLAC_G__
#define __WXSTLAC_G__
#include <stddef.h>
#include <sys/types.h>
#include <memory.h>
#include <limits.h>
#include <new>
// the below macro used internally (see actual interface after this macro)
// arguments:
//
// ARG_IS_UNIQUE
// ASSOC_CONT_CLASS_NAME
//
// ARG_VALUE_TYPE
// ARG_KEY_TYPE
// ARG_ACTUAL_VALUE_TYPE
//
// _KEY_NAME
// _VALUE_NAME
//
// _X_KEY_NAME
// _X_VALUE_NAME
//
// _INSERT_METHOD_DEFINITION
#define __DEFINE_ASOC_CLASS( ARG_IS_UNIQUE, \
FUNCTOR,\
ASSOC_CONT_CLASS_NAME, \
ARG_VALUE_TYPE, \
ARG_KEY_TYPE, \
ARG_ACTUAL_VALUE_TYPE, \
_KEY_NAME, \
_VALUE_NAME, \
_X_KEY_NAME, \
_X_VALUE_NAME, \
_INSERT_METHOD_DEFINITION \
) class \
ASSOC_CONT_CLASS_NAME\
{\
protected:\
\
public:\
typedef ARG_VALUE_TYPE value_type;\
typedef ARG_KEY_TYPE key_type;\
typedef ARG_ACTUAL_VALUE_TYPE actual_value_type;\
\
typedef value_type* pointer;\
typedef value_type& reference;\
\
typedef const value_type& const_reference;\
\
typedef FUNCTOR key_compare;\
typedef key_compare Compare;\
\
protected:\
\
struct tree_node \
{\
tree_node* mpParent;\
tree_node* mpLeft;\
tree_node* mpRight;\
\
value_type mData;\
};\
\
typedef tree_node* node_ref_type;\
\
node_ref_type mpRoot;\
node_ref_type mpLeftMost;\
node_ref_type mpRightMost;\
\
node_ref_type mpFreeListHead;\
int mKeyIsUnique;\
\
key_compare mCmpFunctorObj;\
\
public:\
\
static inline node_ref_type next( node_ref_type pNode )\
{\
if ( pNode->mpRight ) \
{\
pNode = pNode->mpRight;\
\
while ( pNode->mpLeft ) pNode = pNode->mpLeft;\
\
return pNode;\
}\
else\
if ( pNode->mpParent )\
{\
if ( pNode == pNode->mpParent->mpLeft )\
\
return pNode->mpParent;\
\
pNode = pNode->mpParent;\
\
node_ref_type prevNode = pNode;\
pNode = pNode->mpParent;\
\
while(pNode)\
{\
if ( pNode->mpRight &&\
pNode->mpRight != prevNode\
) return pNode;\
\
prevNode = pNode;\
pNode= pNode->mpParent;\
}\
\
return 0;\
}\
else\
return 0;\
}\
\
static inline node_ref_type prev( node_ref_type pNode )\
{\
if ( pNode->mpLeft ) \
{\
pNode = pNode->mpLeft;\
\
while ( pNode->mpRight ) pNode = pNode->mpRight;\
\
return pNode;\
}\
else\
if ( pNode->mpParent )\
{\
if ( pNode == pNode->mpParent->mpRight )\
return pNode->mpParent;\
\
pNode = pNode->mpParent;\
\
node_ref_type prevNode = pNode;\
pNode = pNode->mpParent;\
\
while(pNode)\
{\
if ( pNode->mpLeft &&\
pNode->mpLeft != prevNode\
) return pNode;\
\
prevNode = pNode;\
pNode= pNode->mpParent;\
}\
\
return 0;\
}\
else \
return 0;\
}\
\
protected:\
\
inline int are_equel( const key_type& x, const key_type& y ) const\
{\
mCmpFunctorObj(x,y);\
return ( !mCmpFunctorObj(x,y) && !mCmpFunctorObj(y,x) );\
}\
\
inline int is_less( const key_type& x, const key_type& y ) const\
{\
return mCmpFunctorObj(x,y);\
}\
\
static inline const actual_value_type& value( node_ref_type pNode )\
{\
return pNode->_VALUE_NAME;\
}\
\
static inline const key_type& key( node_ref_type pNode )\
{\
return pNode->_KEY_NAME;\
}\
\
inline node_ref_type AllocNode() \
{ \
if ( mpFreeListHead ) \
{\
node_ref_type pFreeNode = mpFreeListHead;\
mpFreeListHead = mpFreeListHead->mpLeft;\
\
return pFreeNode;\
}\
else\
{\
char* pHeapBlock = new char[sizeof(tree_node)];\
\
return (node_ref_type)pHeapBlock;\
}\
}\
\
inline void DestroyFreeList()\
{\
while ( mpFreeListHead )\
{\
node_ref_type tmp = mpFreeListHead;\
mpFreeListHead = mpFreeListHead->mpLeft;\
\
delete [](char*)tmp;\
}\
}\
\
inline void RecycleNode( node_ref_type pNode ) \
{\
pNode->mpLeft = mpFreeListHead;\
mpFreeListHead = pNode;\
}\
\
inline node_ref_type do_insert(const value_type& x = value_type() )\
{\
node_ref_type pNewNode = AllocNode();\
\
pNewNode->mpParent = \
pNewNode->mpLeft =\
pNewNode->mpRight = 0;\
\
node_ref_type pCurrent = mpRoot;\
node_ref_type pParent = 0;\
\
while (pCurrent) \
{\
if ( mKeyIsUnique && are_equel( _X_KEY_NAME, key(pCurrent) ) )\
{\
RecycleNode(pNewNode);\
return 0;\
}\
\
pParent = pCurrent;\
\
pCurrent = is_less( _X_KEY_NAME, key(pCurrent) ) \
? pCurrent->mpLeft \
: pCurrent->mpRight;\
}\
\
pNewNode->mpParent = pParent;\
\
if(pParent)\
\
if( is_less(_X_KEY_NAME, key(pParent) ) )\
\
pParent->mpLeft = pNewNode;\
else\
pParent->mpRight = pNewNode;\
else\
mpRoot = pNewNode;\
\
new ( &pNewNode->_KEY_NAME ) key_type(_X_KEY_NAME);\
new ( &pNewNode->_VALUE_NAME ) actual_value_type(_X_VALUE_NAME);\
\
if ( prev(pNewNode) == 0 ) mpLeftMost = pNewNode;\
if ( next(pNewNode) == 0 ) mpRightMost = pNewNode;\
\
return pNewNode;\
}\
\
friend class iterator;\
\
public:\
\
class iterator;\
class const_iterator;\
\
class iterator \
{\
public:\
node_ref_type mpNode;\
friend class CONT_CLASS_NAME;\
friend class const_iterator;\
friend class const_reverse_iterator;\
\
inline iterator( node_ref_type pNode )\
{\
mpNode = pNode;\
}\
\
public:\
inline iterator() {}\
inline int operator==( const iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
inline int operator!=( const iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
\
inline iterator( const iterator& other )\
{\
mpNode = other.mpNode;\
}\
\
inline const iterator& operator=( const iterator& other )\
{\
mpNode = other.mpNode;\
return *this;\
}\
\
inline const iterator& operator--() \
{\
mpNode = ASSOC_CONT_CLASS_NAME::prev(mpNode);\
return *this;\
}\
\
inline iterator operator--(int)\
{\
iterator tmp = *this;\
mpNode = ASSOC_CONT_CLASS_NAME::prev(mpNode);\
return tmp;\
}\
\
inline const iterator& operator++() \
{\
mpNode = ASSOC_CONT_CLASS_NAME::next(mpNode);\
return *this;\
}\
\
inline iterator operator++(int)\
{\
iterator tmp = *this;\
mpNode = ASSOC_CONT_CLASS_NAME::next(mpNode);\
return tmp;\
}\
\
inline reference operator*() const { return mpNode->mData; }\
};\
\
\
class const_iterator \
{\
public:\
node_ref_type mpNode;\
friend class CONT_CLASS_NAME;\
friend class const_reverse_iterator;\
\
inline const_iterator( node_ref_type pNode )\
{\
mpNode = pNode;\
}\
\
public:\
inline const_iterator() {}\
\
inline int operator==( const const_iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
inline int operator!=( const const_iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
\
inline const_iterator( const iterator& other )\
{\
mpNode = other.mpNode;\
}\
\
inline const_iterator( const const_iterator& other )\
{\
mpNode = other.mpNode;\
}\
\
inline const const_iterator& operator=( const const_iterator& other )\
{\
mpNode = other.mpNode;\
return *this;\
}\
\
inline const const_iterator& operator--() \
{\
mpNode = ASSOC_CONT_CLASS_NAME::prev(mpNode);\
return *this;\
}\
\
inline const_iterator operator--(int)\
{\
const_iterator tmp = *this;\
mpNode = ASSOC_CONT_CLASS_NAME::prev(mpNode);\
return tmp;\
}\
\
inline const const_iterator& operator++() \
{\
mpNode = ASSOC_CONT_CLASS_NAME::next(mpNode);\
return *this;\
}\
\
inline const_iterator operator++(int)\
{\
const_iterator tmp = *this;\
mpNode = ASSOC_CONT_CLASS_NAME::next(mpNode);\
return tmp;\
}\
\
inline const_reference operator*() const { return mpNode->mData; }\
};\
\
public:\
\
inline ASSOC_CONT_CLASS_NAME( key_compare cmpFunctorObj = key_compare(),\
int keyIsUnique = ARG_IS_UNIQUE )\
: mpFreeListHead( 0 ),\
mKeyIsUnique( keyIsUnique ),\
mCmpFunctorObj( cmpFunctorObj )\
{\
mpLeftMost = 0;\
mpRightMost = 0;\
mpRoot = 0;\
}\
\
inline ~ASSOC_CONT_CLASS_NAME() \
{ \
erase( begin(), end() ); \
\
DestroyFreeList();\
}\
\
inline iterator begin() { return mpLeftMost; }\
inline iterator end() { return 0; }\
\
inline const_iterator begin() const { return mpLeftMost; }\
inline const_iterator end() const { return 0; }\
\
inline iterator lower_bound( const key_type& x )\
{ \
node_ref_type pCurrent = mpRoot;\
\
while( pCurrent )\
{\
node_ref_type pParent = pCurrent;\
\
if( are_equel( x, key(pCurrent) ) )\
\
return (pCurrent);\
else\
pCurrent = is_less( x, key(pCurrent) ) \
? pCurrent->mpLeft \
: pCurrent->mpRight;\
\
if ( !pCurrent ) return (pParent);\
}\
\
return begin();\
}\
\
inline const_iterator lower_bound( const key_type& x ) const\
\
{ return const_iterator( lower_bound(x).mpNode ); }\
\
inline iterator upper_bound( const key_type& x )\
{\
node_ref_type pCurrent = mpRoot;\
\
while( pCurrent )\
{\
node_ref_type pParent = pCurrent;\
\
if( are_equel( x, key(pCurrent) ) )\
\
return (pCurrent);\
else\
pCurrent = is_less( x, key(pCurrent) ) \
? pCurrent->mpLeft \
: pCurrent->mpRight;\
\
if ( !pCurrent ) return next(pParent);\
}\
\
return end();\
}\
\
inline iterator find( const key_type& x ) const\
{\
node_ref_type pCurrent = mpRoot;\
\
while( pCurrent )\
{\
if( are_equel( x, key(pCurrent) ) )\
\
return (pCurrent);\
else\
pCurrent = is_less( x, key(pCurrent) ) \
? pCurrent->mpLeft \
: pCurrent->mpRight;\
}\
\
return iterator(0);\
}\
\
inline actual_value_type& operator[]( const key_type x ) const\
\
{ return find(x).mpNode->_VALUE_NAME; }\
\
inline void erase(iterator first, iterator last)\
{\
if ( first.mpNode == 0 ) return;\
\
while( first != last ) \
{\
iterator next = first;\
++next;\
erase( first );\
first = next;\
}\
}\
\
inline void erase(iterator position)\
{\
if ( position.mpNode == 0 ) return;\
\
node_ref_type pZ = position.mpNode;\
node_ref_type pX, pY;\
\
if ( pZ == mpLeftMost ) mpLeftMost = next(pZ);\
if ( pZ == mpRightMost ) mpRightMost = prev( pZ );\
\
if ( !pZ->mpLeft || !pZ->mpRight )\
\
pY = pZ;\
else \
{\
pY = pZ->mpRight;\
\
while (pY->mpLeft) \
\
pY = pY->mpLeft;\
}\
\
if ( pY->mpLeft)\
\
pX = pY->mpLeft;\
else\
pX = pY->mpRight;\
\
if ( pX ) pX->mpParent = pY->mpParent;\
\
if (pY->mpParent)\
\
if (pY == pY->mpParent->mpLeft )\
\
pY->mpParent->mpLeft = pX;\
else\
pY->mpParent->mpRight = pX;\
else\
mpRoot = pX;\
\
node_ref_type toRemove = 0;\
\
if (pY != pZ) {\
\
pY->mpLeft = pZ->mpLeft;\
\
if (pY->mpLeft) pY->mpLeft->mpParent = pY;\
\
pY->mpRight = pZ->mpRight;\
\
if ( pY->mpRight ) \
\
pY->mpRight->mpParent = pY;\
\
pY->mpParent = pZ->mpParent;\
\
if (pZ->mpParent)\
\
if (pZ == pZ->mpParent->mpLeft)\
\
pZ->mpParent->mpLeft = pY;\
else\
pZ->mpParent->mpRight = pY;\
else\
mpRoot = pY;\
\
toRemove = pZ;\
} \
else \
toRemove = pY;\
\
\
RecycleNode( toRemove );\
}\
\
_INSERT_METHOD_DEFINITION\
}
// do not undefine ___WXSTL_COMMA, where associated containers are defined!
// (it is used as workaround for constraints of C-Preprocessor's nested macros)
#define ___WXSTL_COMMA ,
#define __DEFINE_MAP(ARG_IS_UNIQUE, KEY_TYPE, VAL_TYPE, FUNCTOR ) __DEFINE_ASOC_CLASS( ARG_IS_UNIQUE,\
FUNCTOR,\
__WXSTLMAP_##KEY_TYPE##VAL_TYPE##ARG_IS_UNIQUE, \
struct key_value_pair { KEY_TYPE first ; \
VAL_TYPE second;\
key_value_pair() {}\
key_value_pair( const KEY_TYPE& key ___WXSTL_COMMA const VAL_TYPE& value ) \
: first(key) ___WXSTL_COMMA second( value ) {} \
} , \
KEY_TYPE,\
VAL_TYPE,\
mData.first, mData.second, x.first, x.second, \
struct insert_result_iterator\
{\
iterator first;\
int second;\
};\
inline insert_result_iterator insert( const value_type& x )\
{\
insert_result_iterator result;\
\
result.first = do_insert(x);\
result.second = ( result.first == end() ) ? 0 : 1;\
\
return result;\
} )
#define __DEFINE_SET(ARG_IS_UNIQUE, KEY_TYPE, FUNCTOR ) __DEFINE_ASOC_CLASS( ARG_IS_UNIQUE,\
FUNCTOR,\
__WXSTLSET_##TYPE##ARG_IS_UNIQUE, \
KEY_TYPE,\
KEY_TYPE,\
KEY_TYPE,\
mData, mData, x, x, \
struct insert_result_iterator\
{\
iterator first;\
int second;\
};\
inline insert_result_iterator insert( const value_type& x )\
{\
insert_result_iterator result;\
\
result.first = do_insert(x);\
result.second = ( result.first == end() ) ? 0 : 1;\
\
return result;\
} )
// helper macros to create functor objects for associative containers of the given type
#define LESS_THEN_FUNCTOR(TYPE) struct \
{ inline int operator()(const TYPE& x, const TYPE& y ) const { return x < y; } }
#define GREATER_THEN_FUNCTOR(TYPE) struct \
{ inline int operator()(const TYPE& x, const TYPE& y ) const { return x > y; } }
// functor argument should be created using the two above macros
// or passing own class with method "operator()(const TYPE&,cosnt TYPE&)" defined in it
#define WXSTL_MAP( KEY_TYPE, VALUE_TYPE, FUNCTOR ) __DEFINE_MAP( 1 ,KEY_TYPE, VALUE_TYPE, FUNCTOR)
#define WXSTL_MULTIMAP( KEY_TYPE, VALUE_TYPE, FUNCTOR ) __DEFINE_MAP( 0 ,KEY_TYPE, VALUE_TYPE, FUNCTOR)
#define WXSTL_SET( KEY_TYPE, FUNCTOR ) __DEFINE_SET( 1 ,KEY_TYPE, FUNCTOR )
#define WXSTL_MULTISET( KEY_TYPE, FUNCTOR ) __DEFINE_SET( 0 ,KEY_TYPE, FUNCTOR )
#endif

View File

@@ -0,0 +1,49 @@
#ifndef __WXSTLDEFS_G__
#define __WXSTLDEFS_G__
#include "config.h"
// defines some very commonly used container types
// for both template and macro-based configurations
#if defined( wxUSE_TEMPLATE_STL )
#include <vector>
using namespace std;
#ifdef WIN32xxx
#include <bstring.h>
#else
//#include <strclass.h>
//#include <string.h>
// For now
#include "wx/string.h"
#define string wxString
#endif
#else
#include "wx/string.h"
#include "wxstlvec.h"
// FOR NOW:: quick n' dirty:
#define string wxString
#endif
#if defined( wxUSE_TEMPLATE_STL )
typedef vector<string> StrListT;
typedef vector<int> IntListT;
#else
typedef WXSTL_VECTOR(string) StrListT;
typedef WXSTL_VECTOR_SHALLOW_COPY(int) IntListT;
#endif
#endif

View File

@@ -0,0 +1,555 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 27/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WXSTLLST_G__
#define __WXSTLLST_G__
#include <stddef.h>
#include <sys/types.h>
#include <memory.h>
#include <limits.h>
#include <new>
// VERSION:: 0.2 (copy-constructor/adign-op added)
// FOR NOW:: class-member operators "new" and "delete"
// are ignored by list class, memory allocated
// and freed using global operators
typedef int Type;
// the below macro used internally (see actual interface after this macro)
#define __DEFINE_STL_LIST(listClass,Type) class \
listClass \
{\
public:\
\
typedef Type value_type;\
typedef value_type* pointer;\
typedef const value_type* const_pointer;\
typedef value_type& reference;\
typedef const value_type& const_reference;\
typedef size_t size_type;\
typedef ptrdiff_t difference_type;\
\
protected:\
struct list_node\
{\
list_node* mpNext;\
list_node* mpPrev;\
value_type mData;\
};\
\
typedef list_node* node_ref_type;\
\
node_ref_type mpFreeListHead;\
node_ref_type mpTerminator;\
size_type mSize;\
\
inline node_ref_type AllocNode() \
{ \
if ( mpFreeListHead ) \
{\
node_ref_type pFreeNode = mpFreeListHead;\
mpFreeListHead = mpFreeListHead->mpPrev;\
\
return pFreeNode;\
}\
else\
{\
char* pHeapBlock = new char[sizeof(list_node)];\
\
return (node_ref_type)pHeapBlock;\
}\
}\
\
inline void DestroyFreeList()\
{\
while ( mpFreeListHead )\
{\
node_ref_type tmp = mpFreeListHead;\
mpFreeListHead = mpFreeListHead->mpPrev;\
\
delete [](char*)tmp;\
}\
}\
\
inline void RecycleNode( node_ref_type pNode ) \
{\
pNode->mpPrev = mpFreeListHead;\
mpFreeListHead = pNode;\
}\
\
public:\
\
class iterator \
{\
public:\
node_ref_type mpNode;\
friend class listClass;\
friend class const_iterator;\
friend class const_reverse_iterator;\
\
protected:\
iterator( node_ref_type pNode )\
{\
mpNode = pNode;\
}\
\
public:\
iterator() {}\
int operator==( const iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
int operator!=( const iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
\
inline iterator( const iterator& other )\
{\
mpNode = other.mpNode;\
}\
\
inline const iterator& operator--() \
{\
mpNode = mpNode->mpPrev;\
return *this;\
}\
\
inline iterator operator--(int)\
{\
iterator tmp = *this;\
mpNode = mpNode->mpPrev;\
return tmp;\
}\
\
inline const iterator& operator++() \
{\
mpNode = mpNode->mpNext;\
return *this;\
}\
\
inline iterator operator++(int)\
{\
iterator tmp = *this;\
mpNode = mpNode->mpNext;\
return tmp;\
}\
\
inline reference operator*() const { return mpNode->mData; }\
};\
\
\
class const_iterator \
{\
protected:\
node_ref_type mpNode;\
friend class listClass;\
\
protected:\
const_iterator( node_ref_type pNode )\
{\
mpNode = pNode;\
}\
\
public:\
\
const_iterator() {}\
int operator==( const const_iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
int operator!=( const const_iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
\
\
inline const_iterator( const iterator& other )\
{\
mpNode = other.mpNode;\
}\
\
inline const const_iterator& operator--() \
{\
mpNode = mpNode->mpPrev;\
return *this;\
}\
\
inline const_iterator operator--(int)\
{\
const_iterator tmp = *this;\
mpNode = mpNode->mpPrev;\
return tmp;\
}\
\
inline const const_iterator& operator++() \
{\
mpNode = mpNode->mpNext;\
return *this;\
}\
\
inline const_iterator operator++(int)\
{\
const_iterator tmp = *this;\
mpNode = mpNode->mpNext;\
return tmp;\
}\
\
inline const_reference operator*() const { return mpNode->mData; }\
};\
\
typedef iterator OutputIterator;\
typedef const_iterator InputIterator;\
\
class reverse_iterator \
{\
public:\
node_ref_type mpNode;\
friend class listClass;\
friend class const_reverse_iterator;\
\
protected:\
reverse_iterator ( node_ref_type pNode )\
{\
mpNode = pNode;\
}\
\
public:\
\
reverse_iterator() {}\
int operator==( const reverse_iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
int operator!=( const reverse_iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
\
inline reverse_iterator( const reverse_iterator& other )\
{\
mpNode = other.mpNode;\
}\
\
inline const reverse_iterator& operator--() \
{\
mpNode = mpNode->mpNext;\
return *this;\
}\
\
inline reverse_iterator operator--(int)\
{\
reverse_iterator tmp = *this;\
mpNode = mpNode->mpPrev;\
return tmp;\
}\
\
inline const reverse_iterator & operator++() \
{\
mpNode = mpNode->mpNext;\
return *this;\
}\
\
inline reverse_iterator operator++(int)\
{\
reverse_iterator tmp = *this;\
mpNode = mpNode->mpPrev;\
return tmp;\
}\
\
inline const_reference operator*() const { return mpNode->mData; }\
};\
\
\
class const_reverse_iterator \
{\
protected:\
node_ref_type mpNode;\
friend class listClass;\
\
protected:\
const_reverse_iterator( node_ref_type pNode )\
{\
mpNode = pNode;\
}\
\
public:\
\
const_reverse_iterator() {}\
int operator==( const const_reverse_iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
int operator!=( const const_reverse_iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
\
inline const_reverse_iterator( const reverse_iterator& other )\
{\
mpNode = other.mpNode;\
}\
\
inline const const_reverse_iterator& operator--() \
{\
mpNode = mpNode->mpNext;\
return *this;\
}\
\
inline const_reverse_iterator operator--(int)\
{\
const_reverse_iterator tmp = *this;\
mpNode = mpNode->mpNext;\
return tmp;\
}\
\
inline const const_reverse_iterator& operator++() \
{\
mpNode = mpNode->mpPrev;\
return *this;\
}\
\
inline const_reverse_iterator operator++(int)\
{\
const_reverse_iterator tmp = *this;\
mpNode = mpNode->mpPrev;\
return tmp;\
}\
\
inline const_reference operator*() const { return mpNode->mData; }\
};\
\
public:\
\
inline listClass()\
: mpFreeListHead( 0 ),\
mSize(0)\
{\
mpTerminator = AllocNode();\
mpTerminator->mpPrev = mpTerminator->mpNext = mpTerminator;\
}\
\
listClass( const listClass& other )\
{\
mpTerminator = AllocNode();\
mpTerminator->mpPrev = mpTerminator->mpNext = mpTerminator;\
\
for( listClass::const_iterator i = other.begin(); i != other.end(); ++i )\
\
push_back( (*i) );\
}\
\
inline const listClass& operator=( const listClass& rhs ) \
{\
erase( begin(), end() );\
\
for( listClass::const_iterator i = rhs.begin(); i != rhs.end(); ++i )\
\
push_back( (*i) );\
\
return *this;\
}\
\
inline listClass(const_iterator first, const_iterator last)\
: mpFreeListHead( 0 ),\
mSize(0)\
\
{ while( first != last ) push_back( *first++ ); }\
\
inline listClass( size_type n, const value_type& value = value_type() )\
\
{ for( size_t i = 0; i != n; ++n ) push_back( value ); }\
\
inline ~listClass() \
{ \
erase( begin(), end() ); \
\
RecycleNode( mpTerminator );\
DestroyFreeList();\
}\
\
inline iterator begin() { return iterator(mpTerminator->mpNext); }\
\
inline const_iterator begin() const \
{ return const_iterator(mpTerminator->mpNext); }\
\
inline iterator end() { return iterator(mpTerminator); }\
\
inline const_iterator end() const { return const_iterator(mpTerminator); }\
\
inline reverse_iterator rbegin() \
{ return reverse_iterator(mpTerminator->mpPrev); }\
\
inline reverse_iterator rend() \
{ return reverse_iterator(mpTerminator); }\
\
inline const_reverse_iterator rbegin() const\
{ return const_reverse_iterator(mpTerminator->mpPrev); }\
\
inline const_reverse_iterator rend() const\
{ return const_reverse_iterator(mpTerminator); }\
\
inline int empty() const { return (mSize == 0); }\
\
inline size_type size() const { return mSize; }\
\
inline size_type max_size() const { return UINT_MAX/sizeof(list_node); }\
\
inline reference front() { return mpTerminator->mData; }\
\
inline const_reference front() const { return mpTerminator->mData; }\
\
inline reference back() { return mpTerminator->mpPrev->mData; }\
\
inline const_reference back() const { return mpTerminator->mpPrev->mData; }\
\
inline void push_front(const value_type& x) { insert( begin(), x ); }\
\
inline void push_back(const value_type& x) { insert( end(), x ); }\
\
iterator insert(iterator position, const value_type& x = value_type())\
{\
node_ref_type pNew = AllocNode();\
\
node_ref_type pos = *((node_ref_type*)&position);\
\
pNew->mpNext = pos;\
pNew->mpPrev = pos->mpPrev;\
pos->mpPrev->mpNext = pNew;\
pos->mpPrev = pNew;\
\
new (&pNew->mData) value_type(x);\
\
++mSize;\
\
return iterator(pNew);\
}\
\
inline void insert(iterator position, const_iterator first, const_iterator last )\
{\
while( first != last ) insert( position, *first++ );\
}\
\
inline void splice( iterator position, listClass& other )\
{\
if ( other.begin() == other.end() ) return;\
\
node_ref_type pTill = other.mpTerminator->mpPrev;\
node_ref_type pFrom = other.begin().mpNode;\
\
mpTerminator->mpPrev->mpNext = pFrom;\
pFrom->mpPrev = mpTerminator->mpPrev->mpNext;\
\
pTill->mpNext = mpTerminator;\
mpTerminator->mpPrev = pTill;\
\
other.mpTerminator->mpNext = \
other.mpTerminator->mpPrev = other.mpTerminator;\
\
mSize += other.mSize;\
other.mSize = 0;\
}\
\
inline void splice( iterator position, listClass& other, iterator first, iterator last )\
{\
if ( first == last ) return;\
\
size_type sz = 0;\
iterator tmp = first;\
while( tmp != last ) \
{\
++tmp;\
++sz;\
}\
\
mSize += sz;\
other.mSize -= sz;\
\
node_ref_type pPos = position.mpNode;\
node_ref_type pFirst = first.mpNode;\
node_ref_type pLast = last.mpNode;\
node_ref_type pTill = last.mpNode->mpPrev;\
\
pPos->mpPrev->mpNext = pFirst;\
pPos->mpPrev = pTill;\
\
pFirst->mpPrev->mpNext = last.mpNode;\
pLast->mpPrev = pTill;\
\
pFirst->mpPrev = pPos->mpPrev;\
pTill->mpNext = pPos;\
}\
\
inline void pop_front() { erase( begin() ); }\
inline void pop_back() { erase( --end() ); }\
\
inline void erase(iterator position)\
{\
erase( position, ++position );\
}\
\
inline void erase(iterator first, iterator last)\
{\
node_ref_type firstNode = *((node_ref_type*)&first);\
node_ref_type lastNode = *((node_ref_type*)&last);\
\
firstNode->mpPrev->mpNext = lastNode;\
lastNode->mpPrev = firstNode->mpPrev;\
\
while( firstNode != lastNode )\
{\
node_ref_type next = firstNode->mpNext;\
\
typedef value_type value_type_local;\
firstNode->mData.value_type_local::~value_type_local();\
\
RecycleNode( firstNode );\
\
firstNode = next;\
\
--mSize;\
}\
}\
\
inline void remove(const value_type& value)\
{\
for( iterator i = begin(); i != end(); ++i )\
\
if ( (*i) == value ) \
{\
erase( i ); break;\
}\
}\
\
void sort()\
{\
if ( mSize < 2 ) return;\
\
iterator from = begin();\
iterator other_end = end();\
--other_end;\
\
for( size_type i = 0; i != mSize; ++i )\
{\
size_type nSwaps = 0;\
\
iterator next = begin();\
++next;\
\
for( iterator j = begin(); j != other_end; ++j )\
{\
\
if ( (*next) < (*j) )\
{\
value_type tmp = (*j);\
(*j) = (*next);\
(*next) = tmp;\
\
++nSwaps;\
}\
\
++next;\
}\
\
if ( !nSwaps) break;\
\
--other_end;\
}\
}\
}
// defines list class with the given element type
#define WXSTL_LIST(ELEMENT_CLASS) __DEFINE_STL_LIST(\
\
_WXSTL_LIST_##ELEMENT_CLASS, ELEMENT_CLASS )
#endif

View File

@@ -0,0 +1,857 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 27/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WXSTLVEC_G__
#define __WXSTLVEC_G__
#include <memory.h>
#include <string.h> // imports memmove()
#include <stddef.h>
#include <sys/types.h>
#include <limits.h>
#include <new>
// the below macro used internally (see actual interface after this macro)
#define __DEFINE_STL_VECTOR_DEEP( vectorClass, Type ) class vectorClass {\
\
public:\
typedef Type value_type;\
typedef value_type* iterator;\
typedef const value_type* const_iterator;\
typedef iterator pointer;\
typedef const iterator const_pointer;\
typedef value_type& reference;\
typedef const value_type& const_reference;\
typedef size_t size_type;\
typedef ptrdiff_t difference_type;\
\
typedef iterator OutputIterator;\
typedef const_iterator InputIterator;\
\
protected:\
\
inline void PlacementCopy( const_iterator first, const_iterator last, iterator result )\
{\
while ( first != last ) \
new (result++) value_type(*first++);\
}\
\
inline void ConstructObjects( iterator first, iterator last, const value_type& pattern )\
{\
while( first != last ) \
new (first++) value_type(pattern);\
}\
\
inline void CopyObjects( iterator first, iterator last, iterator result )\
{\
while( first != last ) \
*result++ = *first++;\
}\
\
inline void CopyObjectsBack( iterator first, iterator last, iterator result )\
{\
result += difference_type(last,first);\
\
while( first != last ) \
*(--result) = *(--last);\
}\
\
public:\
\
class reverse_iterator \
{\
friend class vectorClass;\
friend class const_reverse_iterator;\
\
public:\
iterator mpPos;\
\
public:\
\
reverse_iterator() {}\
\
reverse_iterator ( iterator pPos )\
{\
mpPos = pPos;\
}\
\
int operator==( const reverse_iterator& rhs ) const { return (mpPos == rhs.mpPos); }\
int operator!=( const reverse_iterator& rhs ) const { return (mpPos != rhs.mpPos); }\
\
inline reverse_iterator( const reverse_iterator& other )\
{\
mpPos = other.mpPos;\
}\
\
inline const reverse_iterator& operator--() \
{\
--mpPos;\
return *this;\
}\
\
inline reverse_iterator operator--(int)\
{\
reverse_iterator tmp = *this;\
--mpPos;\
return tmp;\
}\
\
inline const reverse_iterator & operator++() \
{\
++mpPos;\
return *this;\
}\
\
inline reverse_iterator operator++(int)\
{\
reverse_iterator tmp = *this;\
++mpPos;\
return tmp;\
}\
\
inline const_reference operator*() const { return *mpPos; }\
};\
\
\
class const_reverse_iterator \
{\
protected:\
iterator mpPos;\
public:\
\
const_reverse_iterator() {}\
\
const_reverse_iterator( const iterator pPos )\
{\
mpPos = pPos;\
}\
\
int operator==( const const_reverse_iterator& rhs ) const { return (mpPos == rhs.mpPos); }\
int operator!=( const const_reverse_iterator& rhs ) const { return (mpPos != rhs.mpPos); }\
\
inline const_reverse_iterator( const reverse_iterator& other )\
{\
mpPos = other.mpPos;\
}\
\
inline const const_reverse_iterator& operator--() \
{\
--mpPos;\
return *this;\
}\
\
inline const_reverse_iterator operator--(int)\
{\
const_reverse_iterator tmp = *this;\
--mpPos;\
return tmp;\
}\
\
inline const const_reverse_iterator & operator++() \
{\
++mpPos;\
return *this;\
}\
\
inline const_reverse_iterator operator++(int)\
{\
const_reverse_iterator tmp = *this;\
++mpPos;\
return tmp;\
}\
\
inline const_reference operator*() const { return *mpPos; }\
};\
\
protected:\
\
pointer mpStart;\
pointer mpEnd;\
pointer mpEndOfBuf;\
\
protected:\
\
inline void quick_sort(int low, int hi) \
{\
int pivot_index;\
int left, right;\
\
pivot_index = ( !(mpStart[low] < mpStart[low+1])) ? low : (low+1);\
value_type pivot_value = mpStart[pivot_index];\
\
left = low; right = hi;\
do \
{\
while ((left <= hi) && (mpStart[left] < pivot_value)) left++;\
\
while ((right >= low) && (pivot_value < mpStart[right])) right--;\
\
if (left <= right) \
{\
value_type tmp = mpStart[left];\
mpStart[left] = mpStart[right];\
mpStart[right] = tmp;\
\
left++;\
right--;\
}\
\
} while (left <= right);\
if (low < right) quick_sort(low, right);\
if (left < hi) quick_sort(left, hi);\
}\
\
inline void DestructRange( iterator first, iterator last )\
{\
typedef value_type value_type_local;\
\
while ( first != last ) \
{\
first->value_type_local::~value_type_local();\
++first;\
}\
}\
\
inline iterator DoInsert(iterator position, const value_type& x)\
{\
if ( mpEnd < mpEndOfBuf )\
{\
new (mpEnd) value_type(*(mpEnd-1) );\
\
CopyObjectsBack( position, mpEnd, position + 1 );\
\
*position = x;\
\
++mpEnd;\
\
return position;\
}\
\
size_type minBufLen = WXSTL_VECTOR_MIN_BUF_SIZE/sizeof(value_type);\
\
size_type doubledSize = size()*2;\
\
size_type newLen = ( doubledSize < minBufLen ) ? minBufLen : doubledSize;\
\
iterator pNewStart = (iterator)( new char[newLen*sizeof(value_type)] );\
\
PlacementCopy( mpStart, position, pNewStart );\
\
iterator atPosition = pNewStart + difference_type( position - mpStart );\
\
new (atPosition) value_type(x);\
\
iterator newPos = atPosition;\
\
++atPosition;\
\
if ( mpStart ) \
{\
PlacementCopy( position, mpEnd, atPosition );\
DestructRange( mpStart, mpEnd );\
delete [](char*)mpStart;\
}\
\
mpEnd = atPosition + difference_type( mpEnd - position );\
\
mpStart = pNewStart;\
mpEndOfBuf = pNewStart + newLen;\
\
return newPos;\
}\
\
public:\
\
inline vectorClass() : mpStart(0), \
mpEnd(0),\
mpEndOfBuf(0)\
{}\
\
inline vectorClass( const_iterator first, const_iterator last )\
: mpStart(0),\
mpEnd(0),\
mpEndOfBuf(0)\
\
{ while( first != last ) push_back( *first++ ); }\
\
inline vectorClass( size_type n, const value_type& value = value_type() )\
: mpStart(0),\
mpEnd(0),\
mpEndOfBuf(0)\
\
{ for( size_type i = 0; i != n; ++i ) push_back( value ); }\
\
inline int operator==( const vectorClass& other )\
{\
size_type sz = size();\
\
if ( sz != other.size() ) return 0;\
\
for( size_type i = 0; i != sz; ++i )\
\
if ( !( (*this)[i] == other[i] ) ) return 0;\
\
return 1;\
\
}\
\
inline const vectorClass& operator=( const vectorClass& other )\
{\
if (mpStart) \
{\
DestructRange( begin(), end() );\
delete [](char*)mpStart; \
}\
\
size_t newLen = difference_type( other.mpEndOfBuf - other.mpStart );\
\
mpStart = (iterator)( new char[newLen*sizeof(value_type)] );\
\
PlacementCopy( other.begin(), other.end(), mpStart );\
\
mpEnd = mpStart + other.size();\
\
mpEndOfBuf = mpStart + newLen;\
\
return *this;\
}\
\
inline vectorClass( const vectorClass& other )\
: mpStart(0),\
mpEnd(0),\
mpEndOfBuf(0)\
{\
this->operator=( other );\
}\
\
inline ~vectorClass() \
{ \
if (mpStart) \
{\
DestructRange( begin(), end() );\
delete [](char*)mpStart; \
}\
}\
\
inline iterator begin() { return mpStart; }\
\
inline const_iterator begin() const { return mpStart; }\
\
inline iterator end() { return mpEnd; }\
\
inline const_iterator end() const { return mpEnd; }\
\
inline size_type size() const { return (size_type)difference_type(mpEnd-mpStart); }\
\
inline size_type max_size() const { return UINT_MAX/sizeof(value_type); }\
\
inline size_type capacity() const \
{ return difference_type(mpEndOfBuf-mpStart)/sizeof(value_type); }\
\
inline int empty() const { return mpStart == mpEnd; }\
\
inline reference operator[](size_type n) { return *(mpStart+n); }\
\
inline const_reference operator[](size_type n) const { return *(mpStart+n); }\
\
inline reference front() { return (*mpStart); }\
\
inline const_reference front() const { return (*mpStart); }\
\
inline reference back() { return (*(mpEnd-1)); }\
\
inline const_reference back() const { return (*(mpEnd-1)); }\
\
inline void reserve(size_type n) {}\
\
inline void push_back(const value_type& x)\
{\
if ( mpEnd != mpEndOfBuf ) \
{\
new (mpEnd) value_type(x);\
++mpEnd;\
}\
else\
DoInsert( mpEnd, x );\
}\
\
inline iterator insert(iterator position, const value_type& x = value_type())\
{\
if ( position == mpEnd && mpEnd != mpEndOfBuf )\
{\
new (mpEnd) value_type(x);\
++mpEnd;\
return (mpEnd-1);\
}\
else return DoInsert( position, x );\
}\
\
inline void pop_back()\
{\
DestructRange( mpEnd-1, mpEnd );\
\
--mpEnd;\
}\
\
inline void erase(iterator first, iterator last)\
{\
if ( last == mpEnd )\
{\
DestructRange( first, last );\
mpEnd = first;\
return;\
}\
\
CopyObjects( last, last + difference_type( mpEnd - last ), first );\
\
iterator newEnd = mpEnd - difference_type( last - first );\
DestructRange( newEnd, mpEnd );\
\
mpEnd = newEnd;\
}\
\
inline void erase( iterator position )\
{\
erase( position, position + 1 );\
}\
\
inline void sort()\
{\
if ( size() < 2 ) return;\
quick_sort( 0, size()-1 );\
}\
}
/////////////////////////////// shallow-copy container ///////////////////////
#define __DEFINE_STL_VECTOR_SHALLOW( vectorClass, Type ) class vectorClass {\
\
public:\
typedef Type value_type;\
typedef value_type* iterator;\
typedef const value_type* const_iterator;\
typedef iterator pointer;\
typedef const iterator const_pointer;\
typedef value_type& reference;\
typedef const value_type& const_reference;\
typedef size_t size_type;\
typedef ptrdiff_t difference_type;\
\
typedef iterator OutputIterator;\
typedef const_iterator InputIterator;\
\
protected:\
\
inline void PlacementCopy( const_iterator first, const_iterator last, iterator result )\
{\
memcpy(result, first, int(difference_type(last-first)*sizeof(value_type)) );\
}\
\
inline void ConstructObjects( iterator first, iterator last, const value_type& pattern )\
{\
if ( sizeof(pattern) == 1 )\
\
memset( first, int(difference_type(last-first)/sizeof(value_type)), \
int(*((char*)&pattern)) );\
else\
while( first != last ) \
*first++ = pattern;\
}\
\
inline void CopyObjects( iterator first, iterator last, iterator result )\
{\
memcpy(result, first, int(difference_type(last-first)*sizeof(value_type)) );\
}\
\
inline void CopyObjectsBack( iterator first, iterator last, iterator result )\
{\
memmove(result, first, int(difference_type(last-first)*sizeof(value_type)) );\
}\
\
public:\
\
class reverse_iterator \
{\
friend class vectorClass;\
friend class const_reverse_iterator;\
\
public:\
iterator mpPos;\
\
public:\
\
reverse_iterator() {}\
\
reverse_iterator ( iterator pPos )\
{\
mpPos = pPos;\
}\
\
int operator==( const reverse_iterator& rhs ) const { return (mpPos == rhs.mpPos); }\
int operator!=( const reverse_iterator& rhs ) const { return (mpPos != rhs.mpPos); }\
\
inline reverse_iterator( const reverse_iterator& other )\
{\
mpPos = other.mpPos;\
}\
\
inline const reverse_iterator& operator--() \
{\
--mpPos;\
return *this;\
}\
\
inline reverse_iterator operator--(int)\
{\
reverse_iterator tmp = *this;\
--mpPos;\
return tmp;\
}\
\
inline const reverse_iterator & operator++() \
{\
++mpPos;\
return *this;\
}\
\
inline reverse_iterator operator++(int)\
{\
reverse_iterator tmp = *this;\
++mpPos;\
return tmp;\
}\
\
inline const_reference operator*() const { return *mpPos; }\
};\
\
\
class const_reverse_iterator \
{\
protected:\
iterator mpPos;\
public:\
\
const_reverse_iterator() {}\
\
const_reverse_iterator( const iterator pPos )\
{\
mpPos = pPos;\
}\
\
int operator==( const const_reverse_iterator& rhs ) const { return (mpPos == rhs.mpPos); }\
int operator!=( const const_reverse_iterator& rhs ) const { return (mpPos != rhs.mpPos); }\
\
inline const_reverse_iterator( const reverse_iterator& other )\
{\
mpPos = other.mpPos;\
}\
\
inline const const_reverse_iterator& operator--() \
{\
--mpPos;\
return *this;\
}\
\
inline const_reverse_iterator operator--(int)\
{\
const_reverse_iterator tmp = *this;\
--mpPos;\
return tmp;\
}\
\
inline const const_reverse_iterator & operator++() \
{\
++mpPos;\
return *this;\
}\
\
inline const_reverse_iterator operator++(int)\
{\
const_reverse_iterator tmp = *this;\
++mpPos;\
return tmp;\
}\
\
inline const_reference operator*() const { return *mpPos; }\
};\
\
protected:\
\
pointer mpStart;\
pointer mpEnd;\
pointer mpEndOfBuf;\
\
protected:\
\
inline void quick_sort(int low, int hi) \
{\
int pivot_index;\
int left, right;\
\
pivot_index = ( !(mpStart[low] < mpStart[low+1])) ? low : (low+1);\
value_type pivot_value = mpStart[pivot_index];\
\
left = low; right = hi;\
do \
{\
while ((left <= hi) && (mpStart[left] < pivot_value)) left++;\
\
while ((right >= low) && (pivot_value < mpStart[right])) right--;\
\
if (left <= right) \
{\
value_type tmp = mpStart[left];\
mpStart[left] = mpStart[right];\
mpStart[right] = tmp;\
\
left++;\
right--;\
}\
\
} while (left <= right);\
if (low < right) quick_sort(low, right);\
if (left < hi) quick_sort(left, hi);\
}\
\
inline void DestructRange( iterator first, iterator last )\
{\
}\
\
inline iterator DoInsert(iterator position, const value_type& x)\
{\
if ( mpEnd < mpEndOfBuf )\
{\
new (mpEnd) value_type(*(mpEnd-1) );\
\
CopyObjectsBack( position, mpEnd, position + 1 );\
\
*position = x;\
\
++mpEnd;\
\
return position;\
}\
\
size_type minBufLen = WXSTL_VECTOR_MIN_BUF_SIZE/sizeof(value_type);\
\
size_type doubledSize = size()*2;\
\
size_type newLen = ( doubledSize < minBufLen ) ? minBufLen : doubledSize;\
\
iterator pNewStart = (iterator)( new char[newLen*sizeof(value_type)] );\
\
PlacementCopy( mpStart, position, pNewStart );\
\
iterator atPosition = pNewStart + difference_type( position - mpStart );\
\
new (atPosition) value_type(x);\
\
iterator newPos = atPosition;\
\
++atPosition;\
\
if ( mpStart ) \
{\
PlacementCopy( position, mpEnd, atPosition );\
DestructRange( mpStart, mpEnd );\
delete [](char*)mpStart;\
}\
\
mpEnd = atPosition + difference_type( mpEnd - position );\
\
mpStart = pNewStart;\
mpEndOfBuf = pNewStart + newLen;\
\
return newPos;\
}\
\
public:\
\
inline vectorClass() : mpStart(0), \
mpEnd(0),\
mpEndOfBuf(0)\
{}\
\
inline vectorClass( const_iterator first, const_iterator last )\
: mpStart(0),\
mpEnd(0),\
mpEndOfBuf(0)\
\
{ while( first != last ) push_back( *first++ ); }\
\
inline vectorClass( size_type n, const value_type& value = value_type() )\
: mpStart(0),\
mpEnd(0),\
mpEndOfBuf(0)\
\
{ for( size_type i = 0; i != n; ++i ) push_back( value ); }\
\
inline int operator==( const vectorClass& other )\
{\
size_type sz = size();\
\
if ( sz != other.size() ) return 0;\
\
for( size_type i = 0; i != sz; ++i )\
\
if ( !( (*this)[i] == other[i] ) ) return 0;\
\
return 1;\
\
}\
\
inline const vectorClass& operator=( const vectorClass& other )\
{\
if (mpStart) \
{\
DestructRange( begin(), end() );\
delete [](char*)mpStart; \
}\
\
size_t newLen = difference_type( other.mpEndOfBuf - other.mpStart );\
\
mpStart = (iterator)( new char[newLen*sizeof(value_type)] );\
\
PlacementCopy( other.begin(), other.end(), mpStart );\
\
mpEnd = mpStart + other.size();\
\
mpEndOfBuf = mpStart + newLen;\
\
return *this;\
}\
\
inline vectorClass( const vectorClass& other )\
: mpStart(0),\
mpEnd(0),\
mpEndOfBuf(0)\
{\
this->operator=( other );\
}\
\
inline ~vectorClass() \
{ \
if (mpStart) \
{\
DestructRange( begin(), end() );\
delete [](char*)mpStart; \
}\
}\
\
inline iterator begin() { return mpStart; }\
\
inline const_iterator begin() const { return mpStart; }\
\
inline iterator end() { return mpEnd; }\
\
inline const_iterator end() const { return mpEnd; }\
\
inline size_type size() const { return (size_type)difference_type(mpEnd-mpStart); }\
\
inline size_type max_size() const { return UINT_MAX/sizeof(value_type); }\
\
inline size_type capacity() const \
{ return difference_type(mpEndOfBuf-mpStart)/sizeof(value_type); }\
\
inline int empty() const { return mpStart == mpEnd; }\
\
inline reference operator[](size_type n) { return *(mpStart+n); }\
\
inline const_reference operator[](size_type n) const { return *(mpStart+n); }\
\
inline reference front() { return (*mpStart); }\
\
inline const_reference front() const { return (*mpStart); }\
\
inline reference back() { return (*(mpEnd-1)); }\
\
inline const_reference back() const { return (*(mpEnd-1)); }\
\
inline void reserve(size_type n) {}\
\
inline void push_back(const value_type& x)\
{\
if ( mpEnd != mpEndOfBuf ) \
{\
new (mpEnd) value_type(x);\
++mpEnd;\
}\
else\
DoInsert( mpEnd, x );\
}\
\
inline iterator insert(iterator position, const value_type& x = value_type())\
{\
if ( position == mpEnd && mpEnd != mpEndOfBuf )\
{\
new (mpEnd) value_type(x);\
++mpEnd;\
return (mpEnd-1);\
}\
else return DoInsert( position, x );\
}\
\
inline void pop_back()\
{\
DestructRange( mpEnd-1, mpEnd );\
\
--mpEnd;\
}\
\
inline void erase(iterator first, iterator last)\
{\
if ( last == mpEnd )\
{\
DestructRange( first, last );\
mpEnd = first;\
return;\
}\
\
CopyObjects( last, last + difference_type( mpEnd - last ), first );\
\
iterator newEnd = mpEnd - difference_type( last - first );\
DestructRange( newEnd, mpEnd );\
\
mpEnd = newEnd;\
}\
\
inline void erase( iterator position )\
{\
erase( position, position + 1 );\
}\
\
inline void sort()\
{\
if ( size() < 2 ) return;\
quick_sort( 0, size()-1 );\
}\
}
// redefine below symbol to change the default allocation unit of vector content buffer
#define WXSTL_VECTOR_MIN_BUF_SIZE 64
// defines vector class, where objects are copied
// using "deep-copy" sematics (i.e. by calling their copy constructors)
#define WXSTL_VECTOR(ELEMENT_CLASS) \
__DEFINE_STL_VECTOR_DEEP(_WXSTL_VECTOR_##ELEMENT_CLASS, ELEMENT_CLASS)
// defines vector class, where objects are copied
// using "shallow-copy" sematics (i.e. instead of calling
// their constructors, memcpy() and memmove() are used to copy their raw data)
#define WXSTL_VECTOR_SHALLOW_COPY(ELEMENT_CLASS) __DEFINE_STL_VECTOR_SHALLOW(_WXSTL_VECTORSC_##ELEMENT_CLASS, ELEMENT_CLASS)
#endif

View File

@@ -0,0 +1,10 @@
sedscript
Makefile.pre
Setup
config.c
Makefile
*.obj
*.pch
*.lib
*.exp

View File

@@ -0,0 +1,21 @@
Aug. 2 1999 Harm van der Heijden
What's in here:
Makefile.pre.in
A custom Makefile.pre.in, originally by Robin Dunn as part of the
wxPython source distribution. Intented for separate wxPython
modules, it should require little or no modification for other
module projects. In these modules they are all identical, except
the one for glcanvas (copies gtk/glcanvas from elsewhere)
Setup.in
A custom Setup.in for building the modules below. It expects to find
the wxPython source dir in the directory specified by WXP_SRCDIR.
All modules are linked agains libwx_pymodule.so, which should
contain the SWIG runtime code and wxPython's helpers.cpp code.
makefile.vc
Very small makefile (list of variable's really). It has a big
brother, makeinc.vc, in the modules dir which is shared by all
modules and does the real work.

View File

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

View File

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

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